aboutsummaryrefslogtreecommitdiffstats
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)
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