summaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-04-18 17:52:11 +0200
committerTheodore Ts'o <tytso@mit.edu>2014-04-18 17:52:11 +0200
commit86f1ca3889142d5959362c5694db3f3dc26f377a (patch)
tree84992693be4208b0bfbe2cc0f4694850ba9e518d /fs/ext4/extents.c
parentext4: enforce we are operating on a regular file in ext4_zero_range() (diff)
downloadlinux-86f1ca3889142d5959362c5694db3f3dc26f377a.tar.xz
linux-86f1ca3889142d5959362c5694db3f3dc26f377a.zip
ext4: use EINVAL if not a regular file in ext4_collapse_range()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2f49b12a4c40..9b9251adb400 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5404,7 +5404,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
return -EINVAL;
if (!S_ISREG(inode->i_mode))
- return -EOPNOTSUPP;
+ return -EINVAL;
trace_ext4_collapse_range(inode, offset, len);