summaryrefslogtreecommitdiffstats
path: root/fs/logfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-05-15 10:02:54 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-22 00:31:27 +0200
commitab9a79b9669c28734a69fa9384df6fb93152e53a (patch)
tree588fc95da1d5769eab4b0a70202d3ac17ababc8e /fs/logfs/inode.c
parentufs: replace inode uid,gid,mode initialization with helper function (diff)
downloadlinux-ab9a79b9669c28734a69fa9384df6fb93152e53a.tar.xz
linux-ab9a79b9669c28734a69fa9384df6fb93152e53a.zip
logfs: replace inode uid,gid,mode initialization with helper function
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-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 755a92e8daa7..f602e230e162 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);