Skip to content

Commit

Permalink
knfsd: Remove dead code from nfsd_cache_lookup
Browse files Browse the repository at this point in the history
The preallocated cache entry is always set to type RC_NOCACHE, and that
type isn't changed until we later call nfsd_cache_update().

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
trondmy authored and J. Bruce Fields committed Oct 29, 2018
1 parent 4c8e553 commit 3e87da5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions fs/nfsd/nfscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,6 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
rp->c_csum = csum;

lru_put_end(b, rp);

/* release any buffer */
if (rp->c_type == RC_REPLBUFF) {
drc_mem_usage -= rp->c_replvec.iov_len;
kfree(rp->c_replvec.iov_base);
rp->c_replvec.iov_base = NULL;
}
rp->c_type = RC_NOCACHE;
out:
spin_unlock(&b->cache_lock);
return rtn;
Expand Down

0 comments on commit 3e87da5

Please sign in to comment.