Skip to content

Commit

Permalink
ocfs2: replace inode uid,gid,mode initialization with helper function
Browse files Browse the repository at this point in the history
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Dmitry Monakhov authored and Al Viro committed May 21, 2010
1 parent 73459dc commit 75fe0a2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,7 @@ static struct inode *ocfs2_get_init_inode(struct inode *dir, int mode)
inode->i_nlink = 2;
else
inode->i_nlink = 1;
inode->i_uid = current_fsuid();
if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;
if (S_ISDIR(mode))
mode |= S_ISGID;
} else
inode->i_gid = current_fsgid();
inode->i_mode = mode;
inode_init_owner(inode, dir, mode);
dquot_initialize(inode);
return inode;
}
Expand Down

0 comments on commit 75fe0a2

Please sign in to comment.