]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bfs: replace inode uid,gid,mode initialization with helper function
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 4 Mar 2010 14:31:46 +0000 (17:31 +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/bfs/dir.c

index 1e41aadb1068672a1969d6496dce9dd5e930b656..8f73841fc97402d068d05d96c3e142bfc3579a4f 100644 (file)
@@ -105,14 +105,12 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
        }
        set_bit(ino, info->si_imap);
        info->si_freei--;
-       inode->i_uid = current_fsuid();
-       inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current_fsgid();
+       inode_init_owner(inode, dir, mode);
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        inode->i_blocks = 0;
        inode->i_op = &bfs_file_inops;
        inode->i_fop = &bfs_file_operations;
        inode->i_mapping->a_ops = &bfs_aops;
-       inode->i_mode = mode;
        inode->i_ino = ino;
        BFS_I(inode)->i_dsk_ino = ino;
        BFS_I(inode)->i_sblock = 0;