projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec84646
)
pNFS: Don't zero out the array in nfs4_alloc_pages()
author
Trond Myklebust
<
[email protected]
>
Mon, 3 Sep 2018 16:57:52 +0000
(12:57 -0400)
committer
Trond Myklebust
<
[email protected]
>
Sun, 30 Sep 2018 19:35:16 +0000
(15:35 -0400)
We don't need a zeroed out array, since it is immediately being filled.
Signed-off-by: Trond Myklebust <
[email protected]
>
fs/nfs/pnfs.c
patch
|
blob
|
history
diff --git
a/fs/nfs/pnfs.c
b/fs/nfs/pnfs.c
index 7d9a51e6b847c65df159d6632a98ac891370f80f..6b5b2d36f5028eb786f304e1de1165466a38bfb0 100644
(file)
--- a/
fs/nfs/pnfs.c
+++ b/
fs/nfs/pnfs.c
@@
-965,7
+965,7
@@
static struct page **nfs4_alloc_pages(size_t size, gfp_t gfp_flags)
struct page **pages;
int i;
- pages = k
calloc
(size, sizeof(struct page *), gfp_flags);
+ pages = k
malloc_array
(size, sizeof(struct page *), gfp_flags);
if (!pages) {
dprintk("%s: can't alloc array of %zu pages\n", __func__, size);
return NULL;
@@
-975,7
+975,7
@@
static struct page **nfs4_alloc_pages(size_t size, gfp_t gfp_flags)
pages[i] = alloc_page(gfp_flags);
if (!pages[i]) {
dprintk("%s: failed to allocate page\n", __func__);
- nfs4_free_pages(pages,
size
);
+ nfs4_free_pages(pages,
i
);
return NULL;
}
}