From a6c5a0342a95f9c7cf18adef79ca52a35cd5e4da Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Thu, 4 Mar 2010 17:32:22 +0300 Subject: udf: replace inode uid,gid,mode init with helper Acked-by: Jan Kara Signed-off-by: Dmitry Monakhov Signed-off-by: Al Viro --- fs/udf/ialloc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'fs/udf/ialloc.c') diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index fb68c9cd0c3..2b5586c7f02 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 = -- cgit v1.2.3