Skip to content

Commit fbc26ee

Browse files
t-8chJoelgranados
authored andcommitted
sysctl: make internal ctl_tables const
Now that the sysctl core can handle registration of "const struct ctl_table" constify the sysctl internal tables. Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Joel Granados <[email protected]>
1 parent 7abc9b5 commit fbc26ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/proc/proc_sysctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static const struct inode_operations proc_sys_dir_operations;
3333
* Support for permanently empty directories.
3434
* Must be non-empty to avoid sharing an address with other tables.
3535
*/
36-
static struct ctl_table sysctl_mount_point[] = {
36+
static const struct ctl_table sysctl_mount_point[] = {
3737
{ }
3838
};
3939

@@ -67,7 +67,7 @@ void proc_sys_poll_notify(struct ctl_table_poll *poll)
6767
wake_up_interruptible(&poll->wait);
6868
}
6969

70-
static struct ctl_table root_table[] = {
70+
static const struct ctl_table root_table[] = {
7171
{
7272
.procname = "",
7373
.mode = S_IFDIR|S_IRUGO|S_IXUGO,

0 commit comments

Comments
 (0)