commit | 6c5e73d3a26b73bfcac0b4a932cb918177d067f2 | [log] [tgz] |
---|---|---|
author | jon ernst <jonernst07@gmail.com> | Fri Apr 18 11:50:35 2014 -0400 |
committer | Theodore Ts'o <tytso@mit.edu> | Fri Apr 18 11:50:35 2014 -0400 |
tree | d6d2b924970c973bf1dc948f54f556cfd1156829 | |
parent | 6dd834effc12ba71092d9d1e4944530234b58ab1 [diff] [blame] |
ext4: enforce we are operating on a regular file in ext4_zero_range() Signed-off-by: Jon Ernst <jonernst07@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index d0860f2..2f49b12a 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c
@@ -4741,6 +4741,9 @@ 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.