summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-08-13 09:39:34 +0200
committerChandan Babu R <chandanbabu@kernel.org>2024-09-03 06:37:37 +0200
commit6e13dbebd5189cd8f70af9fb01b5146be7d7c7db (patch)
treec7efbc1e24c32a97ba4c81ab8ba13d4c73e62d63 /fs/xfs/xfs_inode.c
parentMerge tag 'btree-cleanups-6.12_2024-09-02' of https://git.kernel.org/pub/scm/... (diff)
downloadlinux-6e13dbebd5189cd8f70af9fb01b5146be7d7c7db.tar.xz
linux-6e13dbebd5189cd8f70af9fb01b5146be7d7c7db.zip
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 <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 9ea7a18f5da1..3ec09dc92dfc 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;