aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/ialloc.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-03-04 09:32:22 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:27 -0400
commita6c5a0342a95f9c7cf18adef79ca52a35cd5e4da (patch)
treeb653744e21077ebaf8ea0d7d9deff828e30d42de /fs/udf/ialloc.c
parentabf5d08acaca942b49daf0ed87a9deddc94b183a (diff)
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)
124 udf_updated_lvid(sb); 124 udf_updated_lvid(sb);
125 } 125 }
126 mutex_unlock(&sbi->s_alloc_mutex); 126 mutex_unlock(&sbi->s_alloc_mutex);
127 inode->i_mode = mode; 127
128 inode->i_uid = current_fsuid(); 128 inode_init_owner(inode, dir, mode);
129 if (dir->i_mode & S_ISGID) {
130 inode->i_gid = dir->i_gid;
131 if (S_ISDIR(mode))
132 mode |= S_ISGID;
133 } else {
134 inode->i_gid = current_fsgid();
135 }
136 129
137 iinfo->i_location.logicalBlockNum = block; 130 iinfo->i_location.logicalBlockNum = block;
138 iinfo->i_location.partitionReferenceNum = 131 iinfo->i_location.partitionReferenceNum =