Commit 6c5e73d3 authored by jon ernst's avatar jon ernst Committed by Theodore Ts'o

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

Signed-off-by: default avatarJon Ernst <jonernst07@gmail.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment