The patch titled Subject: fs/inode: avoid unused-variable warning has been added to the -mm tree. Its filename is fs-move-inode-sysctls-to-its-own-file-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/fs-move-inode-sysctls-to-its-own-file-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/fs-move-inode-sysctls-to-its-own-file-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Arnd Bergmann <arnd@xxxxxxxx> Subject: fs/inode: avoid unused-variable warning Now that 'inodes_stat' is marked 'static', it causes a harmless warning whenever it is unused: fs/inode.c:73:29: error: 'inodes_stat' defined but not used [-Werror=unused-variable] 73 | static struct inodes_stat_t inodes_stat; Move it into the #ifdef that guards its only references. Link: https://lkml.kernel.org/r/20211203190123.874239-1-arnd@xxxxxxxxxx Fixes: 245314851782 ("fs: move inode sysctls to its own file") Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/fs/inode.c~fs-move-inode-sysctls-to-its-own-file-fix +++ a/fs/inode.c @@ -67,11 +67,6 @@ const struct address_space_operations em }; EXPORT_SYMBOL(empty_aops); -/* - * Statistics gathering.. - */ -static struct inodes_stat_t inodes_stat; - static DEFINE_PER_CPU(unsigned long, nr_inodes); static DEFINE_PER_CPU(unsigned long, nr_unused); @@ -106,6 +101,11 @@ long get_nr_dirty_inodes(void) * Handle nr_inode sysctl */ #ifdef CONFIG_SYSCTL +/* + * Statistics gathering.. + */ +static struct inodes_stat_t inodes_stat; + static int proc_nr_inodes(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { _ Patches currently in -mm which might be from arnd@xxxxxxxx are fs-move-inode-sysctls-to-its-own-file-fix.patch fs-move-dcache-sysctls-to-its-own-file-fix-2.patch