summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-04-18 11:52:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-04-18 11:52:11 -0400
commit86f1ca3889142d5959362c5694db3f3dc26f377a (patch)
tree84992693be4208b0bfbe2cc0f4694850ba9e518d /fs
parent6c5e73d3a26b73bfcac0b4a932cb918177d067f2 (diff)
downloadlinux-86f1ca3889142d5959362c5694db3f3dc26f377a.tar.bz2
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')
-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);