提交 552fca4c 编写于 作者: N Nikita Danilov 提交者: 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: NNikita Danilov <nikita@clusterfs.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 97e2bde4
...@@ -727,6 +727,8 @@ __mpage_writepages(struct address_space *mapping, ...@@ -727,6 +727,8 @@ __mpage_writepages(struct address_space *mapping,
&last_block_in_bio, &ret, wbc, &last_block_in_bio, &ret, wbc,
writepage_fn); writepage_fn);
} }
if (unlikely(ret == WRITEPAGE_ACTIVATE))
unlock_page(page);
if (ret || (--(wbc->nr_to_write) <= 0)) if (ret || (--(wbc->nr_to_write) <= 0))
done = 1; done = 1;
if (wbc->nonblocking && bdi_write_congested(bdi)) { if (wbc->nonblocking && bdi_write_congested(bdi)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册