Commit 552fca4c authored by Nikita Danilov's avatar Nikita Danilov Committed by Linus Torvalds

[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: default avatarNikita Danilov <nikita@clusterfs.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 97e2bde4
......@@ -727,6 +727,8 @@ __mpage_writepages(struct address_space *mapping,
&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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment