diff options
author | Austin Kim <austindh.kim@gmail.com> | 2021-08-24 04:49:29 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-11-04 10:33:25 -0400 |
commit | 3bbef91bdd2180c67407285ba160b023eb4d5306 (patch) | |
tree | e62391feb39edc24b40351156de6cb44c3abd3d9 /fs/ext4/super.c | |
parent | d4ffeeb7315d82e10803e067cbf079f246b09f00 (diff) | |
download | linux-3bbef91bdd2180c67407285ba160b023eb4d5306.tar.bz2 |
ext4: remove an unused variable warning with CONFIG_QUOTA=n
The 'enable_quota' variable is only used in an CONFIG_QUOTA.
With CONFIG_QUOTA=n, compiler causes a harmless warning:
fs/ext4/super.c: In function ‘ext4_remount’:
fs/ext4/super.c:5840:6: warning: variable ‘enable_quota’ set but not used
[-Wunused-but-set-variable]
int enable_quota = 0;
^~~~~
Move 'enable_quota' into the same #ifdef CONFIG_QUOTA block
to remove an unused variable warning.
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210824034929.GA13415@raspberrypi
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 8a67e5f3f576..160e58249482 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5726,10 +5726,10 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) struct ext4_sb_info *sbi = EXT4_SB(sb); unsigned long old_sb_flags, vfs_flags; struct ext4_mount_options old_opts; - int enable_quota = 0; ext4_group_t g; int err = 0; #ifdef CONFIG_QUOTA + int enable_quota = 0; int i, j; char *to_free[EXT4_MAXQUOTAS]; #endif @@ -5934,7 +5934,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) err = -EROFS; goto restore_opts; } +#ifdef CONFIG_QUOTA enable_quota = 1; +#endif } } |