diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-05-08 17:09:30 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-08 18:23:21 +0900 |
commit | 70ff5dfeb6913cc434d42c7e0cbff16b99d9ae15 (patch) | |
tree | 57397a26f3212b946e989c94cf7839c9648b11f4 /fs/f2fs/namei.c | |
parent | adf8d90b6a949dc80e827263fccb31f8eb08a55d (diff) | |
download | op-kernel-dev-70ff5dfeb6913cc434d42c7e0cbff16b99d9ae15.zip op-kernel-dev-70ff5dfeb6913cc434d42c7e0cbff16b99d9ae15.tar.gz |
f2fs: use inode_init_owner() to simplify codes
This patch uses exported inode_init_owner() to simplify codes in
f2fs_new_inode().
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r-- | fs/f2fs/namei.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index a9409d1..9138c32 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -41,18 +41,9 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) } f2fs_unlock_op(sbi); - 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_init_owner(inode, dir, mode); inode->i_ino = ino; - inode->i_mode = mode; inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_generation = sbi->s_next_generation++; |