summaryrefslogtreecommitdiffstats
path: root/fs/minix/bitmap.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 17:32:14 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:24 -0400
commit9eed1fb721c6c512795f8847bccc413f3a1143bb (patch)
tree9c475b2254491b60474907345be010a0daa6c068 /fs/minix/bitmap.c
parentb10b8520903204c9a1e4ef4a6827c2f1569aae9b (diff)
downloadlinux-9eed1fb721c6c512795f8847bccc413f3a1143bb.tar.gz
linux-9eed1fb721c6c512795f8847bccc413f3a1143bb.tar.bz2
linux-9eed1fb721c6c512795f8847bccc413f3a1143bb.zip
minix: replace inode uid,gid,mode init with helper
- also redesign minix_new_inode interface Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix/bitmap.c')
-rw-r--r--fs/minix/bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c
index 6ac693faae49..482779fe4e7c 100644
--- a/fs/minix/bitmap.c
+++ b/fs/minix/bitmap.c
@@ -221,7 +221,7 @@ void minix_free_inode(struct inode * inode)
clear_inode(inode); /* clear in-memory copy */
}
-struct inode * minix_new_inode(const struct inode * dir, int * error)
+struct inode *minix_new_inode(const struct inode *dir, int mode, int *error)
{
struct super_block *sb = dir->i_sb;
struct minix_sb_info *sbi = minix_sb(sb);
@@ -263,8 +263,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error)
iput(inode);
return NULL;
}
- inode->i_uid = current_fsuid();
- inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current_fsgid();
+ inode_init_owner(inode, dir, mode);
inode->i_ino = j;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
inode->i_blocks = 0;