[PATCH v2 12/31] hfs: drop redundant S_IFDIR from mkdir

From: Jori Koolstra

Date: Tue Jun 30 2026 - 07:00:38 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 hfs_mkdir() is
redundant. Drop it.

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

diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index e13450bb933e..a7bb9009c5ee 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -219,7 +219,7 @@ static struct dentry *hfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct inode *inode;
int res;

- inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode);
+ inode = hfs_new_inode(dir, &dentry->d_name, mode);
if (IS_ERR(inode))
return ERR_CAST(inode);

--
2.54.0