diff options
author | Eric Sandeen <sandeen@redhat.com> | 2024-02-20 15:43:21 -0600 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2024-02-21 13:55:30 +0100 |
commit | 7a8e72c16e734f2ccdfe8d86bcd2e176aa5e978a (patch) | |
tree | ffef47984095be5d3a1dbcdf2addfad9d0e5655d /fs/udf | |
parent | d27f41eed5d64f0f4ca2fcb44f417e7dd9d23e11 (diff) | |
download | lwn-7a8e72c16e734f2ccdfe8d86bcd2e176aa5e978a.tar.gz lwn-7a8e72c16e734f2ccdfe8d86bcd2e176aa5e978a.zip |
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>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/super.c | 6 | ||||
-rw-r--r-- | fs/udf/udf_sb.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 14ed670cfa8b..1d1fb8a27655 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -209,7 +209,6 @@ static const struct super_operations udf_sb_ops = { }; struct udf_options { - unsigned char novrs; unsigned int blocksize; unsigned int session; unsigned int lastblock; @@ -461,7 +460,6 @@ static int udf_parse_options(char *options, struct udf_options *uopt, int option; unsigned int uv; - uopt->novrs = 0; uopt->session = 0xFFFFFFFF; uopt->lastblock = 0; uopt->anchor = 0; @@ -479,7 +477,7 @@ static int udf_parse_options(char *options, struct udf_options *uopt, token = match_token(p, tokens, args); switch (token) { case Opt_novrs: - uopt->novrs = 1; + uopt->flags |= (1 << UDF_FLAG_NOVRS); break; case Opt_bs: if (match_int(&args[0], &option)) @@ -1954,7 +1952,7 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt, return -EINVAL; } sbi->s_last_block = uopt->lastblock; - if (!uopt->novrs) { + if (!UDF_QUERY_FLAG(sb, UDF_FLAG_NOVRS)) { /* Check that it is NSR02 compliant */ nsr = udf_check_vsd(sb); if (!nsr) { diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h index f9a60bc1abcf..08ec8756b948 100644 --- a/fs/udf/udf_sb.h +++ b/fs/udf/udf_sb.h @@ -23,6 +23,7 @@ #define UDF_FLAG_STRICT 5 #define UDF_FLAG_UNDELETE 6 #define UDF_FLAG_UNHIDE 7 +#define UDF_FLAG_NOVRS 8 #define UDF_FLAG_UID_FORGET 11 /* save -1 for uid to disk */ #define UDF_FLAG_GID_FORGET 12 #define UDF_FLAG_UID_SET 13 |