summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-15 01:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-15 01:55:58 +0000
commit53b3988d474435254a3b053a68bb24ce9e439295 (patch)
treef8da8e40f01f4ad02bbd76b8c9920749b118235f /fs/nfsd
parentb0cb48abe83d1a4389ea938bf624f8baa82c5047 (diff)
Merge with 2.3.99-pre9.
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfscache.c7
-rw-r--r--fs/nfsd/nfsfh.c8
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;
}