Commit 552fca4cbe552520d85b21e839f289c880fa48d2

Authored by Nikita Danilov
Committed by Linus Torvalds
1 parent 97e2bde47f

[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 <nikita@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -727,6 +727,8 @@
727 727 &last_block_in_bio, &ret, wbc,
728 728 writepage_fn);
729 729 }
  730 + if (unlikely(ret == WRITEPAGE_ACTIVATE))
  731 + unlock_page(page);
730 732 if (ret || (--(wbc->nr_to_write) <= 0))
731 733 done = 1;
732 734 if (wbc->nonblocking && bdi_write_congested(bdi)) {