diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfscache.c | 7 | ||||
-rw-r--r-- | fs/nfsd/nfsfh.c | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index 79ef12a7b..c47830ff3 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -49,16 +49,21 @@ nfsd_cache_init(void) 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); diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index a5fcdcf7d..f681c9bfc 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -812,17 +812,11 @@ fh_put(struct svc_fh *fhp) { struct dentry * dentry = fhp->fh_dentry; if (fhp->fh_dverified) { + fhp->fh_dentry = NULL; fh_unlock(fhp); fhp->fh_dverified = 0; - if (!dentry->d_count) - goto out_bad; dput(dentry); nfsd_nr_put++; } return; - -out_bad: - printk(KERN_ERR "fh_put: %s/%s has d_count 0!\n", - dentry->d_parent->d_name.name, dentry->d_name.name); - return; } |