Re: [patch] filemap: add missing unlock_page

From: Kirill A. Shutemov
Date: Mon Sep 09 2013 - 04:49:37 EST


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@xxxxxxxxx>
> ---
>
> --- 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/