ext4: use EINVAL if not a regular file in ext4_collapse_range()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o 2014-04-18 11:52:11 -04:00
parent 6c5e73d3a2
commit 86f1ca3889
1 changed files with 1 additions and 1 deletions

View File

@ -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);