[085/129] minix: fix regression in minix_mkdir()

From: Greg KH
Date: Sat Sep 18 2010 - 15:24:48 EST


2.6.35-stable review patch. If anyone has any objections, please let us know.

------------------

From: Jorge Boncompte [DTI2] <jorge@xxxxxxxx>

commit eee743fd7eac9f2ea69ad06d093dfb5a12538fe5 upstream.

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] <jorge@xxxxxxxx>
Cc: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
fs/minix/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/minix/namei.c
+++ b/fs/minix/namei.c
@@ -115,7 +115,7 @@ static int minix_mkdir(struct inode * di

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;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/