Linux filesystem development
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: [PATCH 1/2] fat: move debug into fat_mount_options
Date: Sat, 29 Jun 2024 12:31:27 -0500	[thread overview]
Message-ID: <8817d4ae-7fe7-4f28-baa1-db9cf3bcef1a@redhat.com> (raw)
In-Reply-To: <fe6baab2-a7a0-4fb0-9b94-17c58f73ed62@redhat.com>

Move the debug variable into fat_mount_options for consistency and
to facilitate conversion to the new mount API.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 fs/fat/fat.h   | 3 ++-
 fs/fat/inode.c | 9 ++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 66cf4778cf3b..37ced7bb06d5 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -51,7 +51,8 @@ struct fat_mount_options {
 		 tz_set:1,	   /* Filesystem timestamps' offset set */
 		 rodir:1,	   /* allow ATTR_RO for directory */
 		 discard:1,	   /* Issue discard requests on deletions */
-		 dos1xfloppy:1;	   /* Assume default BPB for DOS 1.x floppies */
+		 dos1xfloppy:1,	   /* Assume default BPB for DOS 1.x floppies */
+		 debug:1;	   /* Not currently used */
 };
 
 #define FAT_HASH_BITS	8
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index d9e6fbb6f246..2a6537ba0d49 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1132,7 +1132,7 @@ static const match_table_t vfat_tokens = {
 };
 
 static int parse_options(struct super_block *sb, char *options, int is_vfat,
-			 int silent, int *debug, struct fat_mount_options *opts)
+			 int silent, struct fat_mount_options *opts)
 {
 	char *p;
 	substring_t args[MAX_OPT_ARGS];
@@ -1162,7 +1162,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
 	opts->tz_set = 0;
 	opts->nfs = 0;
 	opts->errors = FAT_ERRORS_RO;
-	*debug = 0;
+	opts->debug = 0;
 
 	opts->utf8 = IS_ENABLED(CONFIG_FAT_DEFAULT_UTF8) && is_vfat;
 
@@ -1210,7 +1210,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
 			opts->showexec = 1;
 			break;
 		case Opt_debug:
-			*debug = 1;
+			opts->debug = 1;
 			break;
 		case Opt_immutable:
 			opts->sys_immutable = 1;
@@ -1614,7 +1614,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	struct msdos_sb_info *sbi;
 	u16 logical_sector_size;
 	u32 total_sectors, total_clusters, fat_clusters, rootdir_sectors;
-	int debug;
 	long error;
 	char buf[50];
 	struct timespec64 ts;
@@ -1643,7 +1642,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
 			     DEFAULT_RATELIMIT_BURST);
 
-	error = parse_options(sb, data, isvfat, silent, &debug, &sbi->options);
+	error = parse_options(sb, data, isvfat, silent, &sbi->options);
 	if (error)
 		goto out_fail;
 
-- 
2.45.2


  reply	other threads:[~2024-06-29 17:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-29 17:30 [PATCH 0/2] fat: convert to the new mount API Eric Sandeen
2024-06-29 17:31 ` Eric Sandeen [this message]
2024-06-29 17:32 ` [PATCH 2/2] fat: Convert to new mount api Eric Sandeen
2024-06-29 18:02   ` [PATCH 2/2 V2] " Eric Sandeen
2024-07-01 14:15     ` OGAWA Hirofumi
2024-07-01 17:35       ` Eric Sandeen
2024-07-01 20:20         ` Eric Sandeen
2024-07-02  5:04           ` OGAWA Hirofumi
2024-06-29 18:00 ` [PATCH 0/2] fat: convert to the new mount API Eric Sandeen

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=8817d4ae-7fe7-4f28-baa1-db9cf3bcef1a@redhat.com \
    --to=sandeen@redhat.com \
    --cc=brauner@kernel.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --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