“e74359028d5489a281fb2c379a47b1d3cb14526e”上不存在“arch/x86/include/asm/xen/hypercall.h”
提交 13a79a47 编写于 作者: Y Yongqiang Yang 提交者: Theodore Ts'o

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: NYongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
上级 ea51d132
...@@ -1339,8 +1339,11 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd, ...@@ -1339,8 +1339,11 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
clear_buffer_unwritten(bh); clear_buffer_unwritten(bh);
} }
/* skip page if block allocation undone */ /*
if (buffer_delay(bh) || buffer_unwritten(bh)) * skip page if block allocation undone and
* block is dirty
*/
if (ext4_bh_delay_or_unwritten(NULL, bh))
skip_page = 1; skip_page = 1;
bh = bh->b_this_page; bh = bh->b_this_page;
block_start += bh->b_size; block_start += bh->b_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册