[PATCH v2 05/31] autofs: drop redundant S_IFDIR from mkdir

From: Jori Koolstra

Date: Tue Jun 30 2026 - 07:09:16 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 autofs_dir_mkdir() is
redundant. Drop it.

Assisted-by: Claude Opus 4.8 (1M context)
Signed-off-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
---
fs/autofs/root.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/autofs/root.c b/fs/autofs/root.c
index 186e960f1e23..b36439f4521e 100644
--- a/fs/autofs/root.c
+++ b/fs/autofs/root.c
@@ -741,7 +741,7 @@ static struct dentry *autofs_dir_mkdir(struct mnt_idmap *idmap,

autofs_del_active(dentry);

- inode = autofs_get_inode(dir->i_sb, S_IFDIR | mode);
+ inode = autofs_get_inode(dir->i_sb, mode);
if (!inode)
return ERR_PTR(-ENOMEM);

--
2.54.0