aboutsummaryrefslogtreecommitdiff
path: root/fs/logfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-05-15 04:02:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:27 -0400
commitab9a79b9669c28734a69fa9384df6fb93152e53a (patch)
tree588fc95da1d5769eab4b0a70202d3ac17ababc8e /fs/logfs
parentbe8ded5974c69d0d2128a508b0900ef541d0e7da (diff)
logfs: replace inode uid,gid,mode initialization with helper function
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/logfs')
-rw-r--r--fs/logfs/inode.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c
index 755a92e8daa..f602e230e16 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)
inode->i_mode = mode;
logfs_set_ino_generation(sb, inode);
- inode->i_uid = current_fsuid();
- 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;
- }
-
+ inode_init_owner(inode, dir, mode);
logfs_inode_setops(inode);
insert_inode_hash(inode);