fs/proc: Introduce list_for_each_table_entry for proc sysctl
authorMeng Tang <tangmeng@uniontech.com>
Mon, 11 Apr 2022 05:12:05 +0000 (13:12 +0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 21 Apr 2022 18:40:59 +0000 (11:40 -0700)
commitcb55f27ac9326bfe3bcaaf0adb498778d64602b6
treeb3530a9bf307f3768bccedbfc492ebff598ed4e9
parent3c6a4cba3138d1aeeb8fd917178c6578b9b8ae29
fs/proc: Introduce list_for_each_table_entry for proc sysctl

Use the list_for_each_table_entry macro to optimize the scenario
of traverse ctl_table. This make the code neater and easier to
understand.

Suggested-by: Davidlohr Bueso<dave@stgolabs.net>
Signed-off-by: Meng Tang <tangmeng@uniontech.com>
[updated the sysctl_check_table() hunk due to some changes upstream]
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
fs/proc/proc_sysctl.c