]> git.karo-electronics.de Git - linux-beck.git/commit
sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 18 Jan 2012 11:15:51 +0000 (03:15 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:40:29 +0000 (16:40 -0800)
commit6a75ce167c53b41f15088d3c2c7e51c89dc8798a
tree78c811b59a0ca61ac3b34118a726c0c6554bd68e
parent076c3eed2c31773200b082568957fd8852ae93d7
sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry

Replace sysctl_head_next with first_entry and next_entry.  These new
iterators operate at the level of sysctl table entries and filter
out any sysctl tables that should not be shown.

Utilizing two specialized functions instead of a single function removes
conditionals for handling awkward special cases that only come up
at the beginning of iteration, making the iterators easier to read
and understand.

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