aboutsummaryrefslogtreecommitdiffstats
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)
100 p->pagevec = &p->page_array[0]; 100 p->pagevec = &p->page_array[0];
101 else { 101 else {
102 size_t size = ++pagecount * sizeof(struct page *); 102 size_t size = ++pagecount * sizeof(struct page *);
103 p->pagevec = kmalloc(size, GFP_NOFS); 103 p->pagevec = kzalloc(size, GFP_NOFS);
104 if (p->pagevec) { 104 if (!p->pagevec) {
105 memset(p->pagevec, 0, size);
106 } else {
107 mempool_free(p, nfs_commit_mempool); 105 mempool_free(p, nfs_commit_mempool);
108 p = NULL; 106 p = NULL;
109 } 107 }