History

mm: remove the pgprot argument to __vmalloc

The pgprot argument to __vmalloc is always PAGE_KERNEL now, so remove it.

Christoph Hellwig committed 6 years ago

Commit 88dca4c1 parent d28ff9929 files · +47 −59Browse files

Showing the changes to kernel (3 of 29 files). Show all

Unified · Split

3 files
  1. kernel/bpf/core.c +3 −3
  2. kernel/groups.c +1 −1
  3. kernel/module.c +1 −2
kernel/bpf/core.c+3−3
@@ -82,7 +82,7 @@ struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flag · 81 unmodified lines
8282 struct bpf_prog *fp;
8383
8484 size = round_up(size, PAGE_SIZE);
85− fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);
85+ fp = __vmalloc(size, gfp_flags);
8686 if (fp == NULL)
8787 return NULL;
8888
@@ -232,7 +232,7 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, · 143 unmodified lines
232232 if (ret)
233233 return NULL;
234234
235− fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);
235+ fp = __vmalloc(size, gfp_flags);
236236 if (fp == NULL) {
237237 __bpf_prog_uncharge(fp_old->aux->user, delta);
238238 } else {
@@ -1089,7 +1089,7 @@ static struct bpf_prog *bpf_prog_clone_create(struct bpf_prog *fp_other, · 850 unmodified lines
10891089 gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags;
10901090 struct bpf_prog *fp;
10911091
1092− fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags, PAGE_KERNEL);
1092+ fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags);
10931093 if (fp != NULL) {
10941094 /* aux->prog still points to the fp_other one, so
10951095 * when promoting the clone to the real program,
kernel/groups.c+1−1
@@ -20,7 +20,7 @@ struct group_info *groups_alloc(int gidsetsize) · 19 unmodified lines
2020 len = sizeof(struct group_info) + sizeof(kgid_t) * gidsetsize;
2121 gi = kmalloc(len, GFP_KERNEL_ACCOUNT|__GFP_NOWARN|__GFP_NORETRY);
2222 if (!gi)
23− gi = __vmalloc(len, GFP_KERNEL_ACCOUNT, PAGE_KERNEL);
23+ gi = __vmalloc(len, GFP_KERNEL_ACCOUNT);
2424 if (!gi)
2525 return NULL;
2626
kernel/module.c+1−2
@@ -2946,8 +2946,7 @@ static int copy_module_from_user(const void __user *umod, unsigned long len, · 2945 unmodified lines
29462946 return err;
29472947
29482948 /* Suck in entire file: we'll want most of it. */
2949− info->hdr = __vmalloc(info->len,
2950− GFP_KERNEL | __GFP_NOWARN, PAGE_KERNEL);
2949+ info->hdr = __vmalloc(info->len, GFP_KERNEL | __GFP_NOWARN);
29512950 if (!info->hdr)
29522951 return -ENOMEM;
29532952

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t