Skip to content

Commit

Permalink
ext4: use EINVAL if not a regular file in ext4_collapse_range()
Browse files Browse the repository at this point in the history
Signed-off-by: "Theodore Ts'o" <[email protected]>
  • Loading branch information
tytso committed Apr 18, 2014
1 parent 6c5e73d commit 86f1ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 86f1ca3

Please sign in to comment.