In a future commit the sysctl core will only use
"const struct ctl_table". As a preparation for that adapt the
set_ownership callbacks.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
include/linux/sysctl.h | 2 +-
net/sysctl_net.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -205,7 +205,7 @@ struct ctl_table_root {
struct ctl_table_set default_set;
struct ctl_table_set *(*lookup)(struct ctl_table_root *root);
void (*set_ownership)(struct ctl_table_header *head,
- struct ctl_table *table,
+ const struct ctl_table *table,
kuid_t *uid, kgid_t *gid);
int (*permissions)(struct ctl_table_header *head, struct ctl_table *table);
};
@@ -54,7 +54,7 @@ static int net_ctl_permissions(struct ctl_table_header *head,
}
static void net_ctl_set_ownership(struct ctl_table_header *head,
- struct ctl_table *table,
+ const struct ctl_table *table,
kuid_t *uid, kgid_t *gid)
{
struct net *net = container_of(head->set, struct net, sysctls);