linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch] filemap: add missing unlock_page
  2013-09-09  8:18 [patch] filemap: add missing unlock_page Hillf Danton
@ 2013-09-09  7:51 ` Kirill A. Shutemov
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2013-09-09  7:51 UTC (permalink / raw)
  To: Hillf Danton
  Cc: linux-mm, linux-kernel, Hugh Dickins, Andrew Morton, Jan Kara,
	Hillf Danton

On Mon, Sep 09, 2013 at 04:18:22PM +0800, Hillf Danton wrote:
> Unlock and release page before returning error.
> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/mm/filemap.c	Mon Sep  9 15:51:28 2013
> +++ b/mm/filemap.c	Mon Sep  9 15:52:54 2013
> @@ -1844,6 +1844,7 @@ retry:
>  	}
>  	err = filler(data, page);
>  	if (err < 0) {
> +		unlock_page(page);
>  		page_cache_release(page);
>  		return ERR_PTR(err);
>  	}

NAK. filler() should unlock the page.

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [patch] filemap: add missing unlock_page
@ 2013-09-09  8:18 Hillf Danton
  2013-09-09  7:51 ` Kirill A. Shutemov
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2013-09-09  8:18 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, Hugh Dickins, Andrew Morton, Jan Kara, Hillf Danton,
	Hillf Danton

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GBK, Size: 462 bytes --]

Unlock and release page before returning error.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/mm/filemap.c	Mon Sep  9 15:51:28 2013
+++ b/mm/filemap.c	Mon Sep  9 15:52:54 2013
@@ -1844,6 +1844,7 @@ retry:
 	}
 	err = filler(data, page);
 	if (err < 0) {
+		unlock_page(page);
 		page_cache_release(page);
 		return ERR_PTR(err);
 	}
--N‹§²æìr¸›zǧu©ž²Æ {\b­†éì¹»\x1c®&Þ–)îÆi¢žØ^n‡r¶‰šŽŠÝ¢j$½§$¢¸\x05¢¹¨­è§~Š'.)îÄÃ,yèm¶ŸÿÃ\f%Š{±šj+ƒðèž×¦j)Z†·Ÿ

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-09  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  8:18 [patch] filemap: add missing unlock_page Hillf Danton
2013-09-09  7:51 ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).