]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: avoid potential hang in mpage_submit_io() when blocksize < pagesize
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Wed, 14 Dec 2011 02:51:55 +0000 (21:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 Dec 2011 02:51:55 +0000 (21:51 -0500)
commit6502edb227f693da0a6aee324f1fceab3b2e37fe
treeb88b5b99690738c278c48b180cbd1ab2821522f6
parent3b96910bef71aeed4558d20714a8ec6d35931073
ext4: avoid potential hang in mpage_submit_io() when blocksize < pagesize

If there is an unwritten but clean buffer in a page and there is a
dirty buffer after the buffer, then mpage_submit_io does not write the
dirty buffer out.  As a result, da_writepages loops forever.

This patch fixes the problem by checking dirty flag.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/inode.c