Skip to content

Commit 7a8e72c

Browse files
Eric Sandeenjankara
authored andcommitted
udf: convert novrs to an option flag
There's no reason to treat novers specially, convert it to a flag in uopt->flags like other flag options. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <b5d53492-b99a-4b3c-82c0-581df9a9e384@redhat.com>
1 parent d27f41e commit 7a8e72c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

fs/udf/super.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ static const struct super_operations udf_sb_ops = {
209209
};
210210

211211
struct udf_options {
212-
unsigned char novrs;
213212
unsigned int blocksize;
214213
unsigned int session;
215214
unsigned int lastblock;
@@ -461,7 +460,6 @@ static int udf_parse_options(char *options, struct udf_options *uopt,
461460
int option;
462461
unsigned int uv;
463462

464-
uopt->novrs = 0;
465463
uopt->session = 0xFFFFFFFF;
466464
uopt->lastblock = 0;
467465
uopt->anchor = 0;
@@ -479,7 +477,7 @@ static int udf_parse_options(char *options, struct udf_options *uopt,
479477
token = match_token(p, tokens, args);
480478
switch (token) {
481479
case Opt_novrs:
482-
uopt->novrs = 1;
480+
uopt->flags |= (1 << UDF_FLAG_NOVRS);
483481
break;
484482
case Opt_bs:
485483
if (match_int(&args[0], &option))
@@ -1954,7 +1952,7 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt,
19541952
return -EINVAL;
19551953
}
19561954
sbi->s_last_block = uopt->lastblock;
1957-
if (!uopt->novrs) {
1955+
if (!UDF_QUERY_FLAG(sb, UDF_FLAG_NOVRS)) {
19581956
/* Check that it is NSR02 compliant */
19591957
nsr = udf_check_vsd(sb);
19601958
if (!nsr) {

fs/udf/udf_sb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#define UDF_FLAG_STRICT 5
2424
#define UDF_FLAG_UNDELETE 6
2525
#define UDF_FLAG_UNHIDE 7
26+
#define UDF_FLAG_NOVRS 8
2627
#define UDF_FLAG_UID_FORGET 11 /* save -1 for uid to disk */
2728
#define UDF_FLAG_GID_FORGET 12
2829
#define UDF_FLAG_UID_SET 13

0 commit comments

Comments
 (0)