summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index d6ad449041eb..92ecf24455c3 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -100,10 +100,8 @@ static inline struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount)
p->pagevec = &p->page_array[0];
else {
size_t size = ++pagecount * sizeof(struct page *);
- p->pagevec = kmalloc(size, GFP_NOFS);
- if (p->pagevec) {
- memset(p->pagevec, 0, size);
- } else {
+ p->pagevec = kzalloc(size, GFP_NOFS);
+ if (!p->pagevec) {
mempool_free(p, nfs_commit_mempool);
p = NULL;
}