knfsd: Remove dead code from nfsd_cache_lookup
authorTrond Myklebust <trondmy@gmail.com>
Mon, 1 Oct 2018 14:41:54 +0000 (10:41 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Oct 2018 20:58:04 +0000 (16:58 -0400)
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 <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfscache.c

index dbdeb9d6af0392e3017b1ed73feebc993397c269..cef4686f87ef9daea5e2507bd1d87502d8c4e1e0 100644 (file)
@@ -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;