Skip to content

Commit

Permalink
exofs: replace inode uid,gid,mode initialization with helper function
Browse files Browse the repository at this point in the history
Ack-by: Boaz Harrosh <[email protected]>
Signed-off-by: Dmitry Monakhov <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Dmitry Monakhov authored and Al Viro committed May 21, 2010
1 parent ecc11fa commit e00117f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,16 +1123,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
sbi = sb->s_fs_info;

sb->s_dirt = 1;
inode->i_uid = current->cred->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->cred->fsgid;
}
inode->i_mode = mode;

inode_init_owner(inode, dir, mode);
inode->i_ino = sbi->s_nextid++;
inode->i_blkbits = EXOFS_BLKSHIFT;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
Expand Down

0 comments on commit e00117f

Please sign in to comment.