Skip to content

Commit 206d3d8

Browse files
Eric Sandeenbrauner
authored andcommitted
fat: move debug into fat_mount_options
Move the debug variable into fat_mount_options for consistency and to facilitate conversion to new mount API. Signed-off-by: Eric Sandeen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent da99d45 commit 206d3d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

fs/fat/fat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ struct fat_mount_options {
5151
tz_set:1, /* Filesystem timestamps' offset set */
5252
rodir:1, /* allow ATTR_RO for directory */
5353
discard:1, /* Issue discard requests on deletions */
54-
dos1xfloppy:1; /* Assume default BPB for DOS 1.x floppies */
54+
dos1xfloppy:1, /* Assume default BPB for DOS 1.x floppies */
55+
debug:1; /* Not currently used */
5556
};
5657

5758
#define FAT_HASH_BITS 8

fs/fat/inode.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ static const match_table_t vfat_tokens = {
11321132
};
11331133

11341134
static int parse_options(struct super_block *sb, char *options, int is_vfat,
1135-
int silent, int *debug, struct fat_mount_options *opts)
1135+
int silent, struct fat_mount_options *opts)
11361136
{
11371137
char *p;
11381138
substring_t args[MAX_OPT_ARGS];
@@ -1162,7 +1162,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
11621162
opts->tz_set = 0;
11631163
opts->nfs = 0;
11641164
opts->errors = FAT_ERRORS_RO;
1165-
*debug = 0;
1165+
opts->debug = 0;
11661166

11671167
opts->utf8 = IS_ENABLED(CONFIG_FAT_DEFAULT_UTF8) && is_vfat;
11681168

@@ -1210,7 +1210,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
12101210
opts->showexec = 1;
12111211
break;
12121212
case Opt_debug:
1213-
*debug = 1;
1213+
opts->debug = 1;
12141214
break;
12151215
case Opt_immutable:
12161216
opts->sys_immutable = 1;
@@ -1614,7 +1614,6 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
16141614
struct msdos_sb_info *sbi;
16151615
u16 logical_sector_size;
16161616
u32 total_sectors, total_clusters, fat_clusters, rootdir_sectors;
1617-
int debug;
16181617
long error;
16191618
char buf[50];
16201619
struct timespec64 ts;
@@ -1643,7 +1642,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
16431642
ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL,
16441643
DEFAULT_RATELIMIT_BURST);
16451644

1646-
error = parse_options(sb, data, isvfat, silent, &debug, &sbi->options);
1645+
error = parse_options(sb, data, isvfat, silent, &sbi->options);
16471646
if (error)
16481647
goto out_fail;
16491648

0 commit comments

Comments
 (0)