]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 10 Jan 2012 05:42:02 +0000 (21:42 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:40:29 +0000 (16:40 -0800)
commit41794550dab023faa8e47cdc081dead2cd46079f
tree76ddb1483d7a4a04d7910810e8f1dda7be43bf5a
parent6ffa3b7727a8fb155b2f4c978c8af28757ec0d82
sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry.

Replace the helpers that proc_sys_lookup uses with helpers that work
in terms of an entire sysctl directory.  This is worse for sysctl_lock
hold times but it is much better for code clarity and the code cleanups
to come.

find_in_table is no longer needed so it is removed.

find_entry a general helper to find entries in a directory is added.

lookup_entry is a simple wrapper around find_entry that takes the
sysctl_lock increases the use count if an entry is found and drops
the sysctl_lock.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/proc_sysctl.c