Commit ab9a79b9 authored by Al Viro's avatar Al Viro

logfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent be8ded59
...@@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode) ...@@ -358,14 +358,7 @@ struct inode *logfs_new_inode(struct inode *dir, int mode)
inode->i_mode = mode; inode->i_mode = mode;
logfs_set_ino_generation(sb, inode); logfs_set_ino_generation(sb, inode);
inode->i_uid = current_fsuid(); inode_init_owner(inode, dir, mode);
inode->i_gid = current_fsgid();
if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;
if (S_ISDIR(mode))
inode->i_mode |= S_ISGID;
}
logfs_inode_setops(inode); logfs_inode_setops(inode);
insert_inode_hash(inode); insert_inode_hash(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment