[PATCH v2 10/31] f2fs: drop redundant S_IFDIR from mkdir
From: Jori Koolstra
Date: Tue Jun 30 2026 - 07:04:02 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 f2fs_mkdir() is
redundant. Drop it.
Assisted-by: Claude Opus 4.8 (1M context)
Signed-off-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
---
fs/f2fs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index cac03b8e91a1..592ef4ae59b0 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -742,7 +742,7 @@ static struct dentry *f2fs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
if (err)
return ERR_PTR(err);
- inode = f2fs_new_inode(idmap, dir, S_IFDIR | mode, NULL);
+ inode = f2fs_new_inode(idmap, dir, mode, NULL);
if (IS_ERR(inode))
return ERR_CAST(inode);
--
2.54.0