* [PATCH] ext4: unbreak build with CONFIG_QUOTA=n
@ 2023-05-01 13:26 Jakub Sitnicki
2023-05-01 17:41 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Sitnicki @ 2023-05-01 13:26 UTC (permalink / raw)
To: adilger.kernel, jack, lczerner, linux-ext4, ritesh.list, tytso
Cc: yanaijie, kernel-team, kernel test robot
Commit dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()") made some
loop count variables unused when CONFIG_QUOTA is unset.
Make the unused counters local to the loop scope to fix the build.
Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303240449.6Cg6YXJO-lkp@intel.com/
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
fs/ext4/super.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d03bf0ecf505..9b331ef593ea 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1259,7 +1259,7 @@ static void ext4_put_super(struct super_block *sb)
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int aborted = 0;
- int i, err;
+ int err;
/*
* Unregister sysfs before destroying jbd2 journal.
@@ -1311,7 +1311,7 @@ static void ext4_put_super(struct super_block *sb)
ext4_flex_groups_free(sbi);
ext4_percpu_param_destroy(sbi);
#ifdef CONFIG_QUOTA
- for (i = 0; i < EXT4_MAXQUOTAS; i++)
+ for (int i = 0; i < EXT4_MAXQUOTAS; i++)
kfree(get_qf_name(sb, sbi, i));
#endif
@@ -5197,7 +5197,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
ext4_fsblk_t logical_sb_block;
struct inode *root;
int ret = -ENOMEM;
- unsigned int i;
int needs_recovery;
int err = 0;
ext4_group_t first_not_zeroed;
@@ -5628,7 +5627,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
#endif
#ifdef CONFIG_QUOTA
- for (i = 0; i < EXT4_MAXQUOTAS; i++)
+ for (int i = 0; i < EXT4_MAXQUOTAS; i++)
kfree(get_qf_name(sb, sbi, i));
#endif
fscrypt_free_dummy_policy(&sbi->s_dummy_enc_policy);
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: unbreak build with CONFIG_QUOTA=n
2023-05-01 13:26 [PATCH] ext4: unbreak build with CONFIG_QUOTA=n Jakub Sitnicki
@ 2023-05-01 17:41 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2023-05-01 17:41 UTC (permalink / raw)
To: Jakub Sitnicki
Cc: adilger.kernel, jack, lczerner, linux-ext4, ritesh.list, yanaijie,
kernel-team, kernel test robot
On Mon, May 01, 2023 at 03:26:19PM +0200, Jakub Sitnicki wrote:
> Commit dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()") made some
> loop count variables unused when CONFIG_QUOTA is unset.
>
> Make the unused counters local to the loop scope to fix the build.
>
> Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()")
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303240449.6Cg6YXJO-lkp@intel.com/
> Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Thanks, pull request which includes a fix for this problem has already
been sent out to Linus.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-01 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-01 13:26 [PATCH] ext4: unbreak build with CONFIG_QUOTA=n Jakub Sitnicki
2023-05-01 17:41 ` Theodore Ts'o
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).