aboutsummaryrefslogtreecommitdiff
path: root/fs/bfs
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 17:31:46 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:25 -0400
commite6ecdc70fb76490719bf5aa20c35d23c0a392ead (patch)
treeea43271757d63d2248060f26af5d135ef50ea1d9 /fs/bfs
parent75fe0a2477dab30f00c228f9a4d79009d5677bde (diff)
bfs: replace inode uid,gid,mode initialization with helper function
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/bfs')
-rw-r--r--fs/bfs/dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 1e41aadb106..8f73841fc97 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -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;