aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 09:31:48 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:23 -0400
commite00117f14f68d9e54c8aa3d52ebdc76cdbbc4f87 (patch)
tree150ee8e968cef8bf448aaeff258a36c790db8856 /fs/exofs
parentecc11fabf7ce16309112afe68fac466193ee7520 (diff)
exofs: replace inode uid,gid,mode initialization with helper function
Ack-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exofs')
-rw-r--r--fs/exofs/inode.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 76d2a79ef93..d7c6afa7975 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -1123,16 +1123,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1123 sbi = sb->s_fs_info; 1123 sbi = sb->s_fs_info;
1124 1124
1125 sb->s_dirt = 1; 1125 sb->s_dirt = 1;
1126 inode->i_uid = current->cred->fsuid; 1126 inode_init_owner(inode, dir, mode);
1127 if (dir->i_mode & S_ISGID) {
1128 inode->i_gid = dir->i_gid;
1129 if (S_ISDIR(mode))
1130 mode |= S_ISGID;
1131 } else {
1132 inode->i_gid = current->cred->fsgid;
1133 }
1134 inode->i_mode = mode;
1135
1136 inode->i_ino = sbi->s_nextid++; 1127 inode->i_ino = sbi->s_nextid++;
1137 inode->i_blkbits = EXOFS_BLKSHIFT; 1128 inode->i_blkbits = EXOFS_BLKSHIFT;
1138 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 1129 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;