mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
[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>
This commit is contained in:
parent
97e2bde47f
commit
552fca4cbe
@ -727,6 +727,8 @@ retry:
|
|||||||
&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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user