OSDN Git Service

nfsd: remove redundant test from nfsd_reply_cache_free
authorJeff Layton <jlayton@redhat.com>
Mon, 28 Jan 2013 19:41:12 +0000 (14:41 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 4 Feb 2013 14:16:22 +0000 (09:16 -0500)
Entries can only get a c_type of RC_REPLBUFF iff they are
RC_DONE. Therefore the test for RC_DONE isn't necessary here.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfscache.c

index 363bc61..2cdc4be 100644 (file)
@@ -65,7 +65,7 @@ nfsd_reply_cache_alloc(void)
 static void
 nfsd_reply_cache_free_locked(struct svc_cacherep *rp)
 {
-       if (rp->c_state == RC_DONE && rp->c_type == RC_REPLBUFF)
+       if (rp->c_type == RC_REPLBUFF)
                kfree(rp->c_replvec.iov_base);
        list_del(&rp->c_lru);
        kmem_cache_free(drc_slab, rp);