diff options
Diffstat (limited to 'fs/nfsd/nfscache.c')
-rw-r--r-- | fs/nfsd/nfscache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index 6100bbe27432..f90d70475854 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c | |||
@@ -66,14 +66,13 @@ nfsd_cache_init(void) | |||
66 | printk (KERN_ERR "nfsd: cannot allocate all %d cache entries, only got %d\n", | 66 | printk (KERN_ERR "nfsd: cannot allocate all %d cache entries, only got %d\n", |
67 | CACHESIZE, CACHESIZE-i); | 67 | CACHESIZE, CACHESIZE-i); |
68 | 68 | ||
69 | hash_list = kmalloc (HASHSIZE * sizeof(struct hlist_head), GFP_KERNEL); | 69 | hash_list = kcalloc (HASHSIZE, sizeof(struct hlist_head), GFP_KERNEL); |
70 | if (!hash_list) { | 70 | if (!hash_list) { |
71 | nfsd_cache_shutdown(); | 71 | nfsd_cache_shutdown(); |
72 | printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", | 72 | printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", |
73 | HASHSIZE * sizeof(struct hlist_head)); | 73 | HASHSIZE * sizeof(struct hlist_head)); |
74 | return; | 74 | return; |
75 | } | 75 | } |
76 | memset(hash_list, 0, HASHSIZE * sizeof(struct hlist_head)); | ||
77 | 76 | ||
78 | cache_disabled = 0; | 77 | cache_disabled = 0; |
79 | } | 78 | } |