Commit 2b15ad06 authored by Al Viro's avatar Al Viro

dlmfs: use inode_init_owner()

don't open-code it...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 3eda0de6
...@@ -407,9 +407,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb) ...@@ -407,9 +407,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
ip = DLMFS_I(inode); ip = DLMFS_I(inode);
inode->i_ino = get_next_ino(); inode->i_ino = get_next_ino();
inode->i_mode = mode; inode_init_owner(inode, NULL, mode);
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inc_nlink(inode); inc_nlink(inode);
...@@ -433,9 +431,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent, ...@@ -433,9 +431,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
return NULL; return NULL;
inode->i_ino = get_next_ino(); inode->i_ino = get_next_ino();
inode->i_mode = mode; inode_init_owner(inode, parent, mode);
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
...@@ -472,13 +468,6 @@ static struct inode *dlmfs_get_inode(struct inode *parent, ...@@ -472,13 +468,6 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
inc_nlink(inode); inc_nlink(inode);
break; break;
} }
if (parent->i_mode & S_ISGID) {
inode->i_gid = parent->i_gid;
if (S_ISDIR(mode))
inode->i_mode |= S_ISGID;
}
return inode; return 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