diff options
Diffstat (limited to 'fs/logfs/inode.c')
-rw-r--r-- | fs/logfs/inode.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index 755a92e8daa7..f602e230e162 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c | |||
@@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode) | |||
358 | inode->i_mode = mode; | 358 | inode->i_mode = mode; |
359 | logfs_set_ino_generation(sb, inode); | 359 | logfs_set_ino_generation(sb, inode); |
360 | 360 | ||
361 | inode->i_uid = current_fsuid(); | 361 | inode_init_owner(inode, dir, mode); |
362 | inode->i_gid = current_fsgid(); | ||
363 | if (dir->i_mode & S_ISGID) { | ||
364 | inode->i_gid = dir->i_gid; | ||
365 | if (S_ISDIR(mode)) | ||
366 | inode->i_mode |= S_ISGID; | ||
367 | } | ||
368 | |||
369 | logfs_inode_setops(inode); | 362 | logfs_inode_setops(inode); |
370 | insert_inode_hash(inode); | 363 | insert_inode_hash(inode); |
371 | 364 | ||