Skip to content

Commit

Permalink
ubifs: replace inode uid,gid,mode initialization with helper function
Browse files Browse the repository at this point in the history
Acked-by: Artem Bityutskiy <[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 85640bd commit abf5d08
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
*/
inode->i_flags |= (S_NOCMTIME);

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_mtime = inode->i_atime = inode->i_ctime =
ubifs_current_time(inode);
inode->i_mapping->nrpages = 0;
Expand Down

0 comments on commit abf5d08

Please sign in to comment.