lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: quota: avoid unused function warning for !CONFIG_SYSCTL
On Tue 28-03-23 10:48:20, Luis Chamberlain wrote:
> On Tue, Mar 28, 2023 at 02:22:31PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > Note: it may be better to just revert the 63d00e08515b patch, as the
> > -#ifdef CONFIG_SYSCTL
> > - if (!register_sysctl("fs/quota", fs_dqstats_table))
> > - pr_notice("quota sysctl registration failed!\n");
> > -#endif
> > + if (IS_ENABLED(CONFIG_SYSCTL)) {
> > + if (!register_sysctl("fs/quota", fs_dqstats_table))
> > + pr_notice("quota sysctl registration failed!\n");
> > + }
>
> I'd agree to drop that patch and instead just use register_sysctl_init()
> iwht Arnd's strategy.

Ah, indeed, register_sysctl_init() is exactly what we need here. I didn't
know about that helper. Thanks for letting me know.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2023-03-29 11:44    [W:0.051 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site