[PATCH v2 30/31] xfs: drop redundant S_IFDIR from mkdir
From: Jori Koolstra
Date: Tue Jun 30 2026 - 07:09:39 EST
vfs_mkdir() now sets the S_IFDIR type bit in the mode it passes to
->mkdir(), so OR-ing S_IFDIR into the mode again in xfs_vn_mkdir() is
redundant. Drop it.
Assisted-by: Claude Opus 4.8 (1M context)
Signed-off-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
---
fs/xfs/xfs_iops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 6339f4956ecb..a3c02101ff3f 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -306,7 +306,7 @@ xfs_vn_mkdir(
struct dentry *dentry,
umode_t mode)
{
- return ERR_PTR(xfs_generic_create(idmap, dir, dentry, mode | S_IFDIR, 0, NULL));
+ return ERR_PTR(xfs_generic_create(idmap, dir, dentry, mode, 0, NULL));
}
STATIC struct dentry *
--
2.54.0