]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fat: move debug into fat_mount_options
authorEric Sandeen <sandeen@redhat.com>
Tue, 2 Jul 2024 22:41:22 +0000 (17:41 -0500)
committerChristian Brauner <brauner@kernel.org>
Wed, 3 Jul 2024 08:48:59 +0000 (10:48 +0200)
Move the debug variable into fat_mount_options for consistency and
to facilitate conversion to new mount API.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Link: https://lore.kernel.org/r/f6155247-32ee-4cfe-b808-9102b17f7cd1@redhat.com
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fat/fat.h
fs/fat/inode.c

index 66cf4778cf3bc3b4a7f9b11059208977835813c8..37ced7bb06d501248a0cf308e9691e0bdc0ee603 100644 (file)
@@ -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
index d9e6fbb6f246bff4d17142d795c48c023a438b66..2a6537ba0d49e0982fa9ec24356b35d48c169528 100644 (file)
@@ -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;