patch-2.3.99-pre9 linux/fs/nfsd/nfscache.c
Next file: linux/fs/nfsd/nfsfh.c
Previous file: linux/fs/nfs/write.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Mon May 22 09:50:55 2000
- Orig file:
v2.3.99-pre8/linux/fs/nfsd/nfscache.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.3.99-pre8/linux/fs/nfsd/nfscache.c linux/fs/nfsd/nfscache.c
@@ -49,16 +49,21 @@
struct svc_cacherep *rp;
struct nfscache_head *rh;
size_t i;
+ unsigned long order;
if (cache_initialized)
return;
i = CACHESIZE * sizeof (struct svc_cacherep);
- nfscache = kmalloc (i, GFP_KERNEL);
+ for (order = 0; (PAGE_SIZE << order) < i; order++)
+ ;
+ nfscache = (struct svc_cacherep *)
+ __get_free_pages(GFP_KERNEL, order);
if (!nfscache) {
printk (KERN_ERR "nfsd: cannot allocate %d bytes for reply cache\n", i);
return;
}
+ memset(nfscache, 0, i);
i = HASHSIZE * sizeof (struct nfscache_head);
hash_list = kmalloc (i, GFP_KERNEL);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)