sysctl: Add ctl_table_size to ctl_table_header
authorJoel Granados <joel.granados@gmail.com>
Wed, 9 Aug 2023 10:49:55 +0000 (12:49 +0200)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 15 Aug 2023 22:26:17 +0000 (15:26 -0700)
commit1e887723545e037b5e200e77edf79802f58fc818
tree49569df649d1ab3cec185c5d14ed062c1fd4600b
parent18d4b42e9de61546c22c6f47dfc85ca1dbe9459a
sysctl: Add ctl_table_size to ctl_table_header

The new ctl_table_size element will hold the size of the ctl_table
arrays contained in the ctl_table_header. This value should eventually
be passed by the callers to the sysctl register infrastructure. And
while this commit introduces the variable, it does not set nor use it
because that requires case by case considerations for each caller.

It provides two important things: (1) A place to put the
result of the ctl_table array calculation when it gets introduced for
each caller. And (2) the size that will be used as the additional
stopping criteria in the list_for_each_table_entry macro (to be added
when all the callers are migrated)

Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
include/linux/sysctl.h