Andrew Morton <[email protected]> writes:
>> +#ifdef CONFIG_SYSCTL
>> static ctl_table fs_dqstats_table[] = {
>> {
>> .ctl_name = FS_DQ_LOOKUPS,
>> @@ -1918,6 +1919,7 @@ static ctl_table sys_table[] = {
>> },
>> { .ctl_name = 0 },
>> };
>> +#endif
>>
>> static int __init dquot_init(void)
>> {
>> @@ -1926,7 +1928,9 @@ static int __init dquot_init(void)
>>
>> printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
>>
>> +#ifdef CONFIG_SYSCTL
>> register_sysctl_table(sys_table);
>> +#endif
>>
>> dquot_cachep = kmem_cache_create("dquot",
>> sizeof(struct dquot), sizeof(unsigned long) * 4,
>
> We should avoid the ifdefs around the register_sysctl_table() call.
>
> At present the !CONFIG_SYSCTL implementation of register_sysctl_table() is
> a non-inlined NULL-returning stub. All we have to do is to inline that stub
> then these ifdefs can go away.
Yes agreed. What we need to do is to give the compiler enough information
to know that the sysctl table is not used.
Making the function an inline and having the table marked "static"
should be enough for the compiler to do the optimization for us instead
of having to manually remove sysctl tables by hand.
Doing it with an inline function should save us a lot of work and maintenance
in the long run. I will see if I can cook up that patch.
> The same applies to register_sysctl_paths().
Agreed.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]