remarkable-linux/kernel
Eric W. Biederman 29e796fd4d sysctl: Add register_sysctl_paths function
There are a number of modules that register a sysctl table
somewhere deeply nested in the sysctl hierarchy, such as
fs/nfs, fs/xfs, dev/cdrom, etc.

They all specify several dummy ctl_tables for the path name.
This patch implements register_sysctl_path that takes
an additional path name, and makes up dummy sysctl nodes
for each component.

This patch was originally written by Olaf Kirch and
brought to my attention and reworked some by Olaf Hering.
I have changed a few additional things so the bugs are mine.

After converting all of the easy callers Olaf Hering observed
allyesconfig ARCH=i386, the patch reduces the final binary size by 9369 bytes.

.text +897
.data -7008

   text    data     bss     dec     hex filename
   26959310        4045899 4718592 35723801        2211a19 ../vmlinux-vanilla
   26960207        4038891 4718592 35717690        221023a ../O-allyesconfig/vmlinux

So this change is both a space savings and a code simplification.

CC: Olaf Kirch <okir@suse.de>
CC: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Daniel Lezcano <dlezcano@fr.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 14:55:16 -08:00
..
irq genirq: revert lazy irq disable for simple irqs 2007-12-18 18:05:58 +01:00
power driver core: make /sys/power a kobject 2008-01-24 20:40:25 -08:00
time hrtimer: clean up cpu->base locking tricks 2008-01-25 21:08:31 +01:00
.gitignore
acct.c acct: real_parent ppid 2008-01-07 14:55:37 -08:00
audit.c [PATCH] audit: watching subtrees 2007-10-21 02:37:45 -04:00
audit.h [PATCH] audit: watching subtrees 2007-10-21 02:37:45 -04:00
audit_tree.c [PATCH] audit: watching subtrees 2007-10-21 02:37:45 -04:00
auditfilter.c [PATCH] audit: watching subtrees 2007-10-21 02:37:45 -04:00
auditsc.c auditsc: fix kernel-doc param warnings 2007-10-22 19:40:02 -07:00
capability.c
cgroup.c Improve cgroup printks 2007-11-14 18:45:37 -08:00
cgroup_debug.c
compat.c
configs.c
cpu.c cpu-hotplug: replace per-subsystem mutexes with get_online_cpus() 2008-01-25 21:08:02 +01:00
cpuset.c cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() 2008-01-25 21:08:02 +01:00
delayacct.c
dma.c
exec_domain.c
exit.c wait_task_stopped(): pass correct exit_code to wait_noreap_copyout() 2007-11-29 09:24:55 -08:00
extable.c
fork.c kernel: add CLONE_IO to specifically request sharing of IO contexts 2008-01-28 10:50:36 +01:00
futex.c futex: Prevent stale futex owner when interrupted/timeout 2008-01-08 16:21:39 -08:00
futex_compat.c [FUTEX] Fix address computation in compat code. 2007-11-09 16:13:08 -08:00
hrtimer.c hrtimer: unlock hrtimer_wakeup 2008-01-25 21:08:32 +01:00
itimer.c
kallsyms.c FRV: fix the extern declaration of kallsyms_num_syms 2007-11-29 09:24:54 -08:00
Kconfig.hz sched: high-res preemption tick 2008-01-25 21:08:29 +01:00
Kconfig.instrumentation Tiny clean-up of OPROFILE/KPROBES configuration 2007-12-06 09:41:12 -08:00
Kconfig.preempt sched: remove the !PREEMPT_BKL code 2008-01-25 21:08:33 +01:00
kexec.c vmcoreinfo: add the array length of "free_list" for filtering free pages 2008-01-08 16:10:36 -08:00
kfifo.c
kmod.c Fix unbalanced helper_lock in kernel/kmod.c 2008-01-17 15:38:59 -08:00
kprobes.c
ksysfs.c Kobject: convert remaining kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
kthread.c sched: fix, always create kernel threads with normal priority 2008-01-25 21:08:33 +01:00
latency.c
latencytop.c sched: latencytop support 2008-01-25 21:08:34 +01:00
lockdep.c softlockup: automatically detect hung TASK_UNINTERRUPTIBLE tasks 2008-01-25 21:08:02 +01:00
lockdep_internals.h
lockdep_proc.c
Makefile sched: latencytop support 2008-01-25 21:08:34 +01:00
marker.c Linux Kernel Markers: fix marker mutex not taken upon module load 2007-11-14 18:45:40 -08:00
module.c debug: track and print last unloaded module in the oops trace 2008-01-25 21:08:33 +01:00
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
ns_cgroup.c
nsproxy.c
panic.c debug: add end-of-oops marker 2007-12-20 15:01:17 +01:00
params.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-01-25 17:19:08 -08:00
pid.c pidns: Place under CONFIG_EXPERIMENTAL 2007-11-14 18:45:43 -08:00
posix-cpu-timers.c sched: rt-watchdog: fix .rlim_max = RLIM_INFINITY 2008-01-25 21:08:32 +01:00
posix-timers.c
printk.c printk: revert ktime_get() timestamps 2008-01-27 08:03:54 +01:00
profile.c debug: clean up kernel/profile.c 2008-01-25 21:08:33 +01:00
ptrace.c ptrace: Call arch_ptrace_attach() when request=PTRACE_TRACEME 2008-01-25 08:31:39 +01:00
rcuclassic.c Preempt-RCU: implementation 2008-01-25 21:08:24 +01:00
rcupdate.c Preempt-RCU: fix rcu_barrier for preemptive environment. 2008-01-25 21:08:24 +01:00
rcupreempt.c Preempt-RCU: CPU Hotplug handling 2008-01-25 21:08:25 +01:00
rcupreempt_trace.c Preempt-RCU: implementation 2008-01-25 21:08:24 +01:00
rcutorture.c cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() 2008-01-25 21:08:02 +01:00
relay.c
resource.c Add IORESOUCE_BUSY flag for System RAM 2007-11-14 18:45:39 -08:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c sched: mark rwsem functions as __sched for wchan/profiling 2007-12-18 15:21:13 +01:00
sched.c sched: print backtrace of running tasks too 2008-01-25 21:08:34 +01:00
sched_debug.c sched: keep total / count stats in addition to the max for 2008-01-25 21:08:35 +01:00
sched_fair.c sched: keep total / count stats in addition to the max for 2008-01-25 21:08:35 +01:00
sched_idletask.c sched: high-res preemption tick 2008-01-25 21:08:29 +01:00
sched_rt.c sched: fix goto retry in pick_next_task_rt() 2008-01-25 21:08:34 +01:00
sched_stats.h sched: clean up kernel/sched_stat.h 2007-11-28 15:52:56 +01:00
seccomp.c
signal.c sigwait eats blocked default-ignore signals 2007-11-12 16:05:23 -08:00
softirq.c
softlockup.c softlockup: fix signedness 2008-01-25 21:08:34 +01:00
spinlock.c
srcu.c
stacktrace.c
stop_machine.c cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() 2008-01-25 21:08:02 +01:00
sys.c x86: ignore the sys_getcpu() tcache parameter 2007-11-17 16:27:00 +01:00
sys_ni.c [COMPAT]: Fix build on COMPAT platforms when CONFIG_NET is disabled. 2007-10-30 21:29:56 -07:00
sysctl.c sysctl: Add register_sysctl_paths function 2008-01-28 14:55:16 -08:00
sysctl_check.c [S390] Remove appldata include from sysctl_check.c 2008-01-26 14:11:16 +01:00
taskstats.c kernel/taskstats.c: fix bogus nlmsg_free() 2007-11-14 18:45:44 -08:00
time.c
timer.c hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback 2008-01-25 21:08:31 +01:00
tsacct.c
uid16.c
user.c uids: merge multiple error paths in alloc_uid() into one 2008-01-25 21:08:26 +01:00
user_namespace.c
utsname.c
utsname_sysctl.c Isolate the UTS namespace's domainname and hostname back 2007-11-29 09:24:53 -08:00
wait.c
workqueue.c cpu-hotplug: replace per-subsystem mutexes with get_online_cpus() 2008-01-25 21:08:02 +01:00