Skip to content

Commit

Permalink
logfs: replace inode uid,gid,mode initialization with helper function
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 21, 2010
1 parent be8ded5 commit ab9a79b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/logfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode)
inode->i_mode = mode;
logfs_set_ino_generation(sb, inode);

inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;
if (S_ISDIR(mode))
inode->i_mode |= S_ISGID;
}

inode_init_owner(inode, dir, mode);
logfs_inode_setops(inode);
insert_inode_hash(inode);

Expand Down

0 comments on commit ab9a79b

Please sign in to comment.