From: Christoph Hellwig Date: Tue, 13 Aug 2024 07:39:34 +0000 (+0200) Subject: xfs: remove the i_mode check in xfs_release X-Git-Tag: v6.12-rc1~138^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e13dbebd5189cd8f70af9fb01b5146be7d7c7db;p=thirdparty%2Flinux.git xfs: remove the i_mode check in xfs_release xfs_release is only called from xfs_file_release, which is wired up as the f_op->release handler for regular files only. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 9ea7a18f5da14..3ec09dc92dfc5 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1086,9 +1086,6 @@ xfs_release( xfs_mount_t *mp = ip->i_mount; int error = 0; - if (!S_ISREG(VFS_I(ip)->i_mode) || (VFS_I(ip)->i_mode == 0)) - return 0; - /* If this is a read-only mount, don't do this (would generate I/O) */ if (xfs_is_readonly(mp)) return 0;