diff options
Diffstat (limited to 'fs/udf/ialloc.c')
-rw-r--r-- | fs/udf/ialloc.c | 11 |
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 = |