[PATCH 1/2] udf: Drop pointless IS_IMMUTABLE and IS_APPEND check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 fs/udf/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 2f831a3a91af..04b0e62cf73f 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1248,8 +1248,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);
-- 
2.35.3





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux