From: Nikita Danilov Date: Sun, 1 May 2005 15:58:39 +0000 (-0700) Subject: [PATCH] mpage_writepages() page locking fix X-Git-Tag: v2.6.12-rc4~136^2~173 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=552fca4cbe552520d85b21e839f289c880fa48d2;p=linux-2.6 [PATCH] mpage_writepages() page locking fix When ->writepage() returns WRITEPAGE_ACTIVATE, the page is still locked. Explicitly unlock the page in mpage_writepages(). Signed-off-by: Nikita Danilov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/mpage.c b/fs/mpage.c index e7d8d1a776..3923facf94 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -727,6 +727,8 @@ retry: &last_block_in_bio, &ret, wbc, writepage_fn); } + if (unlikely(ret == WRITEPAGE_ACTIVATE)) + unlock_page(page); if (ret || (--(wbc->nr_to_write) <= 0)) done = 1; if (wbc->nonblocking && bdi_write_congested(bdi)) {