diff options
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/inode.c | 10 | ||||
-rw-r--r-- | fs/udf/super.c | 2 | ||||
-rw-r--r-- | fs/udf/udf_sb.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 0d2c41666cd2..1652b2c665bb 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1127,13 +1127,15 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh) | |||
1127 | } | 1127 | } |
1128 | 1128 | ||
1129 | inode->i_uid = le32_to_cpu(fe->uid); | 1129 | inode->i_uid = le32_to_cpu(fe->uid); |
1130 | if (inode->i_uid == -1 || UDF_QUERY_FLAG(inode->i_sb, | 1130 | if (inode->i_uid == -1 || |
1131 | UDF_FLAG_UID_IGNORE)) | 1131 | UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_IGNORE) || |
1132 | UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_SET)) | ||
1132 | inode->i_uid = UDF_SB(inode->i_sb)->s_uid; | 1133 | inode->i_uid = UDF_SB(inode->i_sb)->s_uid; |
1133 | 1134 | ||
1134 | inode->i_gid = le32_to_cpu(fe->gid); | 1135 | inode->i_gid = le32_to_cpu(fe->gid); |
1135 | if (inode->i_gid == -1 || UDF_QUERY_FLAG(inode->i_sb, | 1136 | if (inode->i_gid == -1 || |
1136 | UDF_FLAG_GID_IGNORE)) | 1137 | UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_IGNORE) || |
1138 | UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_SET)) | ||
1137 | inode->i_gid = UDF_SB(inode->i_sb)->s_gid; | 1139 | inode->i_gid = UDF_SB(inode->i_sb)->s_gid; |
1138 | 1140 | ||
1139 | inode->i_nlink = le16_to_cpu(fe->fileLinkCount); | 1141 | inode->i_nlink = le16_to_cpu(fe->fileLinkCount); |
diff --git a/fs/udf/super.c b/fs/udf/super.c index 7b30964665db..382be7be5ae3 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -366,11 +366,13 @@ static int udf_parse_options(char *options, struct udf_options *uopt) | |||
366 | if (match_int(args, &option)) | 366 | if (match_int(args, &option)) |
367 | return 0; | 367 | return 0; |
368 | uopt->gid = option; | 368 | uopt->gid = option; |
369 | uopt->flags |= (1 << UDF_FLAG_GID_SET); | ||
369 | break; | 370 | break; |
370 | case Opt_uid: | 371 | case Opt_uid: |
371 | if (match_int(args, &option)) | 372 | if (match_int(args, &option)) |
372 | return 0; | 373 | return 0; |
373 | uopt->uid = option; | 374 | uopt->uid = option; |
375 | uopt->flags |= (1 << UDF_FLAG_UID_SET); | ||
374 | break; | 376 | break; |
375 | case Opt_umask: | 377 | case Opt_umask: |
376 | if (match_octal(args, &option)) | 378 | if (match_octal(args, &option)) |
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h index 3e937d3fb8f9..3c2982017c6d 100644 --- a/fs/udf/udf_sb.h +++ b/fs/udf/udf_sb.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #define UDF_FLAG_UID_IGNORE 12 /* use sb uid instead of on disk uid */ | 24 | #define UDF_FLAG_UID_IGNORE 12 /* use sb uid instead of on disk uid */ |
25 | #define UDF_FLAG_GID_FORGET 13 | 25 | #define UDF_FLAG_GID_FORGET 13 |
26 | #define UDF_FLAG_GID_IGNORE 14 | 26 | #define UDF_FLAG_GID_IGNORE 14 |
27 | #define UDF_FLAG_UID_SET 15 | ||
28 | #define UDF_FLAG_GID_SET 16 | ||
27 | 29 | ||
28 | #define UDF_PART_FLAG_UNALLOC_BITMAP 0x0001 | 30 | #define UDF_PART_FLAG_UNALLOC_BITMAP 0x0001 |
29 | #define UDF_PART_FLAG_UNALLOC_TABLE 0x0002 | 31 | #define UDF_PART_FLAG_UNALLOC_TABLE 0x0002 |