Convert 'alloc_flex' family to use the new default GFP_KERNEL argument

This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds
2026-02-21 17:06:51 -08:00
parent bf4afc53b7
commit 323bbfcf1e
310 changed files with 352 additions and 352 deletions

View File

@@ -139,7 +139,7 @@ hugetlb_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
struct hugetlb_cgroup *h_cgroup;
int node;
h_cgroup = kzalloc_flex(*h_cgroup, nodeinfo, nr_node_ids, GFP_KERNEL);
h_cgroup = kzalloc_flex(*h_cgroup, nodeinfo, nr_node_ids);
if (!h_cgroup)
return ERR_PTR(-ENOMEM);

View File

@@ -91,7 +91,7 @@ struct anon_vma_name *anon_vma_name_alloc(const char *name)
/* Add 1 for NUL terminator at the end of the anon_name->name */
count = strlen(name) + 1;
anon_name = kmalloc_flex(*anon_name, name, count, GFP_KERNEL);
anon_name = kmalloc_flex(*anon_name, name, count);
if (anon_name) {
kref_init(&anon_name->kref);
memcpy(anon_name->name, name, count);

View File

@@ -3880,7 +3880,7 @@ static int __init add_weighted_interleave_group(struct kobject *mempolicy_kobj)
{
int nid, err;
wi_group = kzalloc_flex(*wi_group, nattrs, nr_node_ids, GFP_KERNEL);
wi_group = kzalloc_flex(*wi_group, nattrs, nr_node_ids);
if (!wi_group)
return -ENOMEM;
mutex_init(&wi_group->kobj_lock);