summaryrefslogtreecommitdiff
path: root/fs/proc
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 /fs/proc
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
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 'fs/proc')
-rw-r--r--fs/proc/kcore.c6
-rw-r--r--fs/proc/root.c4
-rw-r--r--fs/proc/task_mmu.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 55438bc0afc8..390547b992ac 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -143,7 +143,7 @@ static int kcore_ram_list(struct list_head *head)
{
struct kcore_list *ent;
- ent = kmalloc_obj(*ent, GFP_KERNEL);
+ ent = kmalloc_obj(*ent);
if (!ent)
return -ENOMEM;
ent->addr = (unsigned long)__va(0);
@@ -178,7 +178,7 @@ get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head)
end = tmp->addr;
}
if (start < end) {
- vmm = kmalloc_obj(*vmm, GFP_KERNEL);
+ vmm = kmalloc_obj(*vmm);
if (!vmm)
return 0;
vmm->addr = start;
@@ -210,7 +210,7 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg)
p = pfn_to_page(pfn);
- ent = kmalloc_obj(*ent, GFP_KERNEL);
+ ent = kmalloc_obj(*ent);
if (!ent)
return -ENOMEM;
ent->addr = (unsigned long)page_to_virt(p);
diff --git a/fs/proc/root.c b/fs/proc/root.c
index fb0ccacb08e6..0f9100559471 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -249,7 +249,7 @@ static int proc_fill_super(struct super_block *s, struct fs_context *fc)
struct proc_fs_info *fs_info;
int ret;
- fs_info = kzalloc_obj(*fs_info, GFP_KERNEL);
+ fs_info = kzalloc_obj(*fs_info);
if (!fs_info)
return -ENOMEM;
@@ -331,7 +331,7 @@ static int proc_init_fs_context(struct fs_context *fc)
{
struct proc_fs_context *ctx;
- ctx = kzalloc_obj(struct proc_fs_context, GFP_KERNEL);
+ ctx = kzalloc_obj(struct proc_fs_context);
if (!ctx)
return -ENOMEM;
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 0418511f69fe..e091931d7ca1 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2981,7 +2981,7 @@ static int pagemap_scan_init_bounce_buffer(struct pagemap_scan_private *p)
p->vec_buf_len = min_t(size_t, PAGEMAP_WALK_SIZE >> PAGE_SHIFT,
p->arg.vec_len);
- p->vec_buf = kmalloc_objs(*p->vec_buf, p->vec_buf_len, GFP_KERNEL);
+ p->vec_buf = kmalloc_objs(*p->vec_buf, p->vec_buf_len);
if (!p->vec_buf)
return -ENOMEM;