Skip to content

Commit c1f1b25

Browse files
committed
udf: Drop pointless IS_IMMUTABLE and IS_APPEND check
udf_setsize() checks for IS_IMMUTABLE and IS_APPEND flags. This is however pointless as UDF does not have capability to store these flags and never allows to set them. Furthermore this is the only place in UDF code that was actually checking these flags. Remove the pointless check. Signed-off-by: Jan Kara <[email protected]>
1 parent 03fceb8 commit c1f1b25

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/udf/inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,8 +1247,6 @@ int udf_setsize(struct inode *inode, loff_t newsize)
12471247
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
12481248
S_ISLNK(inode->i_mode)))
12491249
return -EINVAL;
1250-
if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
1251-
return -EPERM;
12521250

12531251
filemap_invalidate_lock(inode->i_mapping);
12541252
iinfo = UDF_I(inode);

0 commit comments

Comments
 (0)