minix: fix regression in minix_mkdir()
authorJorge Boncompte [DTI2] <[email protected]>
Thu, 9 Sep 2010 23:38:19 +0000 (16:38 -0700)
committerLinus Torvalds <[email protected]>
Fri, 10 Sep 2010 01:57:25 +0000 (18:57 -0700)
Commit 9eed1fb721c ("minix: replace inode uid,gid,mode init with helper")
broke directory creation on minix filesystems.

Fix it by passing the needed mode flag to inode init helper.

Signed-off-by: Jorge Boncompte [DTI2] <[email protected]>
Cc: Dmitry Monakhov <[email protected]>
Cc: Al Viro <[email protected]>
Cc: <[email protected]> [2.6.35.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/minix/namei.c

index e20ee85955d1c77c3a410da2c82893cd38acce8e..f3f3578393a417085812ba1ad7e0b7c1e4e5c981 100644 (file)
@@ -115,7 +115,7 @@ static int minix_mkdir(struct inode * dir, struct dentry *dentry, int mode)
 
        inode_inc_link_count(dir);
 
-       inode = minix_new_inode(dir, mode, &err);
+       inode = minix_new_inode(dir, S_IFDIR | mode, &err);
        if (!inode)
                goto out_dir;