Patch "ext4: remove an unused variable warning with CONFIG_QUOTA=n" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ext4: remove an unused variable warning with CONFIG_QUOTA=n

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-remove-an-unused-variable-warning-with-config_q.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 518e14f3716293e9dcda16fd6533c4035a4ecc31
Author: Austin Kim <austindh.kim@xxxxxxxxx>
Date:   Tue Aug 24 04:49:29 2021 +0100

    ext4: remove an unused variable warning with CONFIG_QUOTA=n
    
    [ Upstream commit 3bbef91bdd2180c67407285ba160b023eb4d5306 ]
    
    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@xxxxxxxxx>
    Reviewed-by: Jan Kara <jack@xxxxxxx>
    Link: https://lore.kernel.org/r/20210824034929.GA13415@raspberrypi
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Stable-dep-of: a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e6cd2bf9508e4..ca0997fcd1215 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5742,10 +5742,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
@@ -5951,7 +5951,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
 		}
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux