diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-20 13:44:10 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:10 -0500 |
commit | bd6475454c774bd9dbe6078d94bbf72b1d3b65f4 (patch) | |
tree | 641c38589e2aa02a22db229be7d77c9c342a81cb /fs/nfs/write.c | |
parent | a162a6b804b48c605d1fd35e1861a5d32d00ad3f (diff) |
NFS: kzalloc conversion in fs/nfs
this converts fs/nfs to kzalloc() usage.
compile tested with make allyesconfig
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 6 |
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 | } |