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:
parent
6c5e73d3a2
commit
86f1ca3889
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue