omfs: replace inode uid,gid,mode initialization with helper function
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 4 Mar 2010 14:32:17 +0000 (17:32 +0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 May 2010 22:31:25 +0000 (18:31 -0400)
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/omfs/inode.c

index b44bb83..089839a 100644 (file)
@@ -37,9 +37,7 @@ struct inode *omfs_new_inode(struct inode *dir, int mode)
                goto fail;
 
        inode->i_ino = new_block;
-       inode->i_mode = mode;
-       inode->i_uid = current_fsuid();
-       inode->i_gid = current_fsgid();
+       inode_init_owner(inode, NULL, mode);
        inode->i_mapping->a_ops = &omfs_aops;
 
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;