summaryrefslogtreecommitdiffstats
path: root/fs/udf/ialloc.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 17:32:22 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:27 -0400
commita6c5a0342a95f9c7cf18adef79ca52a35cd5e4da (patch)
treeb653744e21077ebaf8ea0d7d9deff828e30d42de /fs/udf/ialloc.c
parentabf5d08acaca942b49daf0ed87a9deddc94b183a (diff)
downloadlinux-stable-a6c5a0342a95f9c7cf18adef79ca52a35cd5e4da.tar.gz
linux-stable-a6c5a0342a95f9c7cf18adef79ca52a35cd5e4da.tar.bz2
linux-stable-a6c5a0342a95f9c7cf18adef79ca52a35cd5e4da.zip
udf: replace inode uid,gid,mode init with helper
Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf/ialloc.c')
-rw-r--r--fs/udf/ialloc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index fb68c9cd0c3e..2b5586c7f02a 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -124,15 +124,8 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
udf_updated_lvid(sb);
}
mutex_unlock(&sbi->s_alloc_mutex);
- inode->i_mode = mode;
- inode->i_uid = current_fsuid();
- if (dir->i_mode & S_ISGID) {
- inode->i_gid = dir->i_gid;
- if (S_ISDIR(mode))
- mode |= S_ISGID;
- } else {
- inode->i_gid = current_fsgid();
- }
+
+ inode_init_owner(inode, dir, mode);
iinfo->i_location.logicalBlockNum = block;
iinfo->i_location.partitionReferenceNum =