diff options
author | Jan Kara <jack@suse.cz> | 2024-05-20 15:18:44 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2024-06-05 10:36:46 +0200 |
commit | c1f1b25a6089eb93a11a147e8de766c0d6ad29ac (patch) | |
tree | f49f1a819bc915fce2ddfa4e8e1a390f7e18effe /fs/udf | |
parent | 03fceb8dbd09923f271271a438da049f75eb9c10 (diff) |
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 <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/inode.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 2fb21c5ffccf..9d39fdd26015 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1247,8 +1247,6 @@ int udf_setsize(struct inode *inode, loff_t newsize) if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) return -EINVAL; - if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) - return -EPERM; filemap_invalidate_lock(inode->i_mapping); iinfo = UDF_I(inode); |