Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Sandeen and committed by
Jan Kara
7a8e72c1 d27f41ee

+3 -4
+2 -4
fs/udf/super.c
··· 209 209 }; 210 210 211 211 struct udf_options { 212 - unsigned char novrs; 213 212 unsigned int blocksize; 214 213 unsigned int session; 215 214 unsigned int lastblock; ··· 460 461 int option; 461 462 unsigned int uv; 462 463 463 - uopt->novrs = 0; 464 464 uopt->session = 0xFFFFFFFF; 465 465 uopt->lastblock = 0; 466 466 uopt->anchor = 0; ··· 477 479 token = match_token(p, tokens, args); 478 480 switch (token) { 479 481 case Opt_novrs: 480 - uopt->novrs = 1; 482 + uopt->flags |= (1 << UDF_FLAG_NOVRS); 481 483 break; 482 484 case Opt_bs: 483 485 if (match_int(&args[0], &option)) ··· 1952 1954 return -EINVAL; 1953 1955 } 1954 1956 sbi->s_last_block = uopt->lastblock; 1955 - if (!uopt->novrs) { 1957 + if (!UDF_QUERY_FLAG(sb, UDF_FLAG_NOVRS)) { 1956 1958 /* Check that it is NSR02 compliant */ 1957 1959 nsr = udf_check_vsd(sb); 1958 1960 if (!nsr) {
+1
fs/udf/udf_sb.h
··· 23 23 #define UDF_FLAG_STRICT 5 24 24 #define UDF_FLAG_UNDELETE 6 25 25 #define UDF_FLAG_UNHIDE 7 26 + #define UDF_FLAG_NOVRS 8 26 27 #define UDF_FLAG_UID_FORGET 11 /* save -1 for uid to disk */ 27 28 #define UDF_FLAG_GID_FORGET 12 28 29 #define UDF_FLAG_UID_SET 13