diff options
Diffstat (limited to 'fs/minix/namei.c')
-rw-r--r-- | fs/minix/namei.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 32b131cd6121..e20ee85955d1 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c | |||
@@ -46,10 +46,9 @@ static int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, dev_ | |||
46 | if (!old_valid_dev(rdev)) | 46 | if (!old_valid_dev(rdev)) |
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | 48 | ||
49 | inode = minix_new_inode(dir, &error); | 49 | inode = minix_new_inode(dir, mode, &error); |
50 | 50 | ||
51 | if (inode) { | 51 | if (inode) { |
52 | inode->i_mode = mode; | ||
53 | minix_set_inode(inode, rdev); | 52 | minix_set_inode(inode, rdev); |
54 | mark_inode_dirty(inode); | 53 | mark_inode_dirty(inode); |
55 | error = add_nondir(dentry, inode); | 54 | error = add_nondir(dentry, inode); |
@@ -73,11 +72,10 @@ static int minix_symlink(struct inode * dir, struct dentry *dentry, | |||
73 | if (i > dir->i_sb->s_blocksize) | 72 | if (i > dir->i_sb->s_blocksize) |
74 | goto out; | 73 | goto out; |
75 | 74 | ||
76 | inode = minix_new_inode(dir, &err); | 75 | inode = minix_new_inode(dir, S_IFLNK | 0777, &err); |
77 | if (!inode) | 76 | if (!inode) |
78 | goto out; | 77 | goto out; |
79 | 78 | ||
80 | inode->i_mode = S_IFLNK | 0777; | ||
81 | minix_set_inode(inode, 0); | 79 | minix_set_inode(inode, 0); |
82 | err = page_symlink(inode, symname, i); | 80 | err = page_symlink(inode, symname, i); |
83 | if (err) | 81 | if (err) |
@@ -117,13 +115,10 @@ static int minix_mkdir(struct inode * dir, struct dentry *dentry, int mode) | |||
117 | 115 | ||
118 | inode_inc_link_count(dir); | 116 | inode_inc_link_count(dir); |
119 | 117 | ||
120 | inode = minix_new_inode(dir, &err); | 118 | inode = minix_new_inode(dir, mode, &err); |
121 | if (!inode) | 119 | if (!inode) |
122 | goto out_dir; | 120 | goto out_dir; |
123 | 121 | ||
124 | inode->i_mode = S_IFDIR | mode; | ||
125 | if (dir->i_mode & S_ISGID) | ||
126 | inode->i_mode |= S_ISGID; | ||
127 | minix_set_inode(inode, 0); | 122 | minix_set_inode(inode, 0); |
128 | 123 | ||
129 | inode_inc_link_count(inode); | 124 | inode_inc_link_count(inode); |