Skip to content

Commit ab9a79b

Browse files
author
Al Viro
committed
logfs: replace inode uid,gid,mode initialization with helper function
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent be8ded5 commit ab9a79b

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎fs/logfs/inode.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode)
358358
inode->i_mode = mode;
359359
logfs_set_ino_generation(sb, inode);
360360

361-
inode->i_uid = current_fsuid();
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-
361+
inode_init_owner(inode, dir, mode);
369362
logfs_inode_setops(inode);
370363
insert_inode_hash(inode);
371364

0 commit comments

Comments
 (0)