Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221570
b: refs/heads/master
c: 408af87
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Nov 5, 2010
1 parent 69d6e2d commit fb7730b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a8a0caddec7f77174a33e53f5ee9e87181b6232
refs/heads/master: 408af87a397a8ddef56ad39a79481f592aa1ac1a
15 changes: 4 additions & 11 deletions trunk/kernel/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,10 @@ static const struct vm_operations_struct relay_file_mmap_ops = {
*/
static struct page **relay_alloc_page_array(unsigned int n_pages)
{
struct page **array;
size_t pa_size = n_pages * sizeof(struct page *);

if (pa_size > PAGE_SIZE) {
array = vmalloc(pa_size);
if (array)
memset(array, 0, pa_size);
} else {
array = kzalloc(pa_size, GFP_KERNEL);
}
return array;
const size_t pa_size = n_pages * sizeof(struct page *);
if (pa_size > PAGE_SIZE)
return vzalloc(pa_size);
return kzalloc(pa_size, GFP_KERNEL);
}

/*
Expand Down

0 comments on commit fb7730b

Please sign in to comment.