From: Eric Sandeen <sandeen@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>, David Howells <dhowells@redhat.com>,
Bill O'Donnell <billodo@redhat.com>
Subject: [PATCH 1/2] udf: convert novrs to an option flag
Date: Tue, 20 Feb 2024 15:43:21 -0600 [thread overview]
Message-ID: <b5d53492-b99a-4b3c-82c0-581df9a9e384@redhat.com> (raw)
In-Reply-To: <ecf5bc91-69fc-45ce-a70c-c0cd84c42766@redhat.com>
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>
---
fs/udf/super.c | 6 ++----
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 928a04d9d9e0..5b036c8b08a8 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))
@@ -1946,7 +1944,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
--
2.43.0
next prev parent reply other threads:[~2024-02-20 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 21:42 [PATCH 0/2] udf: convert to new mount API Eric Sandeen
2024-02-20 21:43 ` Eric Sandeen [this message]
2024-02-20 21:44 ` [PATCH 2/2] " Eric Sandeen
2024-02-21 12:58 ` [PATCH 0/2] " Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5d53492-b99a-4b3c-82c0-581df9a9e384@redhat.com \
--to=sandeen@redhat.com \
--cc=billodo@redhat.com \
--cc=dhowells@redhat.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).