summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/export.c4
-rw-r--r--net/sunrpc/cache.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 4e0578121d9..3eec30000f3 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1066,9 +1066,11 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
rv = nfserr_perm;
else if (IS_ERR(exp))
rv = nfserrno(PTR_ERR(exp));
- else
+ else {
rv = fh_compose(fhp, exp,
fsid_key->ek_dentry, NULL);
+ exp_put(exp);
+ }
cache_put(&fsid_key->h, &svc_expkey_cache);
return rv;
}
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 3ac4193a78e..7026b0866b7 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -159,6 +159,7 @@ struct cache_head *sunrpc_cache_update(struct cache_detail *detail,
detail->update(tmp, new);
tmp->next = *head;
*head = tmp;
+ detail->entries++;
cache_get(tmp);
is_new = cache_fresh_locked(tmp, new->expiry_time);
cache_fresh_locked(old, 0);