summaryrefslogtreecommitdiff
path: root/net/netfilter/ipvs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /net/netfilter/ipvs
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/netfilter/ipvs')
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c8
-rw-r--r--net/netfilter/ipvs/ip_vs_dh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_est.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_lblc.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_lblcr.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_mh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_sh.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_sync.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_wrr.c2
10 files changed, 15 insertions, 15 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index d38867c52180..35642de2a0fe 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -938,7 +938,7 @@ int ip_vs_stats_init_alloc(struct ip_vs_stats *s)
struct ip_vs_stats *ip_vs_stats_alloc(void)
{
- struct ip_vs_stats *s = kzalloc_obj(*s, GFP_KERNEL);
+ struct ip_vs_stats *s = kzalloc_obj(*s);
if (s && ip_vs_stats_init_alloc(s) >= 0)
return s;
@@ -1079,7 +1079,7 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest)
return -EINVAL;
}
- dest = kzalloc_obj(struct ip_vs_dest, GFP_KERNEL);
+ dest = kzalloc_obj(struct ip_vs_dest);
if (dest == NULL)
return -ENOMEM;
@@ -1421,7 +1421,7 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u,
ret_hooks = ret;
}
- svc = kzalloc_obj(struct ip_vs_service, GFP_KERNEL);
+ svc = kzalloc_obj(struct ip_vs_service);
if (svc == NULL) {
IP_VS_DBG(1, "%s(): no memory\n", __func__);
ret = -ENOMEM;
@@ -4439,7 +4439,7 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)
INIT_DELAYED_WORK(&ipvs->est_reload_work, est_reload_work_handler);
/* procfs stats */
- ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats, GFP_KERNEL);
+ ipvs->tot_stats = kzalloc_obj(*ipvs->tot_stats);
if (!ipvs->tot_stats)
goto out;
if (ip_vs_stats_init_alloc(&ipvs->tot_stats->s) < 0)
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c
index ac1d6f5bfe8a..e1f62f6b25e2 100644
--- a/net/netfilter/ipvs/ip_vs_dh.c
+++ b/net/netfilter/ipvs/ip_vs_dh.c
@@ -153,7 +153,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc)
struct ip_vs_dh_state *s;
/* allocate the DH table for this service */
- s = kzalloc_obj(struct ip_vs_dh_state, GFP_KERNEL);
+ s = kzalloc_obj(struct ip_vs_dh_state);
if (s == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index 06999a17519b..b17de33314da 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -325,7 +325,7 @@ static int ip_vs_est_add_kthread(struct netns_ipvs *ipvs)
id = i;
}
- kd = kzalloc_obj(*kd, GFP_KERNEL);
+ kd = kzalloc_obj(*kd);
if (!kd)
goto out;
kd->ipvs = ipvs;
@@ -443,7 +443,7 @@ add_est:
td = rcu_dereference_protected(kd->ticks[row], 1);
if (!td) {
- td = kzalloc_obj(*td, GFP_KERNEL);
+ td = kzalloc_obj(*td);
if (!td) {
ret = -ENOMEM;
goto out;
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index 36d91153712c..15ccb2b2fa1f 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -347,7 +347,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
/*
* Allocate the ip_vs_lblc_table for this service
*/
- tbl = kmalloc_obj(*tbl, GFP_KERNEL);
+ tbl = kmalloc_obj(*tbl);
if (tbl == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index eba6600decbe..c90ea897c3f7 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -510,7 +510,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
/*
* Allocate the ip_vs_lblcr_table for this service
*/
- tbl = kmalloc_obj(*tbl, GFP_KERNEL);
+ tbl = kmalloc_obj(*tbl);
if (tbl == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_mh.c b/net/netfilter/ipvs/ip_vs_mh.c
index 7f5be86bab4d..c029ff6b3eb2 100644
--- a/net/netfilter/ipvs/ip_vs_mh.c
+++ b/net/netfilter/ipvs/ip_vs_mh.c
@@ -382,7 +382,7 @@ static int ip_vs_mh_init_svc(struct ip_vs_service *svc)
struct ip_vs_mh_state *s;
/* Allocate the MH table for this service */
- s = kzalloc_obj(*s, GFP_KERNEL);
+ s = kzalloc_obj(*s);
if (!s)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index a62c1e8fc1da..0046aed1fb38 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -66,7 +66,7 @@ register_ip_vs_proto_netns(struct netns_ipvs *ipvs, struct ip_vs_protocol *pp)
{
unsigned int hash = IP_VS_PROTO_HASH(pp->protocol);
struct ip_vs_proto_data *pd =
- kzalloc_obj(struct ip_vs_proto_data, GFP_KERNEL);
+ kzalloc_obj(struct ip_vs_proto_data);
if (!pd)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c
index a4616433b445..cd67066e3b26 100644
--- a/net/netfilter/ipvs/ip_vs_sh.c
+++ b/net/netfilter/ipvs/ip_vs_sh.c
@@ -229,7 +229,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc)
struct ip_vs_sh_state *s;
/* allocate the SH table for this service */
- s = kzalloc_obj(struct ip_vs_sh_state, GFP_KERNEL);
+ s = kzalloc_obj(struct ip_vs_sh_state);
if (s == NULL)
return -ENOMEM;
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index f83732777228..b2ba3befbd55 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1827,7 +1827,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
struct ipvs_master_sync_state *ms;
result = -ENOMEM;
- ipvs->ms = kzalloc_objs(ipvs->ms[0], count, GFP_KERNEL);
+ ipvs->ms = kzalloc_objs(ipvs->ms[0], count);
if (!ipvs->ms)
goto out;
ms = ipvs->ms;
@@ -1841,7 +1841,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
}
}
result = -ENOMEM;
- ti = kzalloc_objs(struct ip_vs_sync_thread_data, count, GFP_KERNEL);
+ ti = kzalloc_objs(struct ip_vs_sync_thread_data, count);
if (!ti)
goto out;
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c
index 58c65af9830a..2dcff1040da5 100644
--- a/net/netfilter/ipvs/ip_vs_wrr.c
+++ b/net/netfilter/ipvs/ip_vs_wrr.c
@@ -109,7 +109,7 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc)
/*
* Allocate the mark variable for WRR scheduling
*/
- mark = kmalloc_obj(struct ip_vs_wrr_mark, GFP_KERNEL);
+ mark = kmalloc_obj(struct ip_vs_wrr_mark);
if (mark == NULL)
return -ENOMEM;