Skip to content

Commit

Permalink
nilfs2: replace inode uid,gid,mode initialization with helper function
Browse files Browse the repository at this point in the history
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
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 9eed1fb commit 73459dc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fs/nilfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,7 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode)
/* reference count of i_bh inherits from nilfs_mdt_read_block() */

atomic_inc(&sbi->s_inodes_count);

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);
inode->i_ino = ino;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;

Expand Down

0 comments on commit 73459dc

Please sign in to comment.