提交 6c5e73d3 编写于 作者: J jon ernst 提交者: Theodore Ts'o

ext4: enforce we are operating on a regular file in ext4_zero_range()

Signed-off-by: NJon Ernst <jonernst07@gmail.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 6dd834ef
......@@ -4741,6 +4741,9 @@ static long ext4_zero_range(struct file *file, loff_t offset,
trace_ext4_zero_range(inode, offset, len, mode);
if (!S_ISREG(inode->i_mode))
return -EINVAL;
/*
* Write out all dirty pages to avoid race conditions
* Then release them.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册