[PATCH] f2fs: quota: fix unused-label warning

Arnd Bergmann posted 1 patch 1 week ago
fs/f2fs/super.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] f2fs: quota: fix unused-label warning
Posted by Arnd Bergmann 1 week ago
From: Arnd Bergmann <arnd@arndb.de>

The newly added label causes a warning when QUOTA is turned off:

fs/f2fs/super.c: In function '__f2fs_remount':
fs/f2fs/super.c:3142:1: error: label 'restore_holder' defined but not used [-Werror=unused-label]
 3142 | restore_holder:
      | ^~~~~~~~~~~~~~

Fixes: 3f140a60c92a ("f2fs: quota: fix stale lock holder on remount failure")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/f2fs/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 6a2f09c61dcd..8358cdefa859 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3139,7 +3139,9 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb)
 	sbi->mount_opt = org_mount_opt;
 	sb->s_flags = old_sb_flags;
 
+#ifdef CONFIG_QUOTA
 restore_holder:
+#endif
 	sbi->umount_lock_holder = NULL;
 	return err;
 }
-- 
2.53.0
Re: [f2fs-dev] [PATCH] f2fs: quota: fix unused-label warning
Posted by Randy Dunlap 1 day, 6 hours ago

On 9/17/26 7:21 AM, Arnd Bergmann via Linux-f2fs-devel wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The newly added label causes a warning when QUOTA is turned off:
> 
> fs/f2fs/super.c: In function '__f2fs_remount':
> fs/f2fs/super.c:3142:1: error: label 'restore_holder' defined but not used [-Werror=unused-label]
>  3142 | restore_holder:
>       | ^~~~~~~~~~~~~~
> 
> Fixes: 3f140a60c92a ("f2fs: quota: fix stale lock holder on remount failure")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  fs/f2fs/super.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 6a2f09c61dcd..8358cdefa859 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -3139,7 +3139,9 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb)
>  	sbi->mount_opt = org_mount_opt;
>  	sb->s_flags = old_sb_flags;
>  
> +#ifdef CONFIG_QUOTA
>  restore_holder:
> +#endif
>  	sbi->umount_lock_holder = NULL;
>  	return err;
>  }

-- 
~Randy