nfsd: remove redundant assignment to pointer 'this'
authorColin Ian King <colin.king@canonical.com>
Thu, 13 May 2021 15:16:39 +0000 (16:16 +0100)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 7 Jul 2021 00:14:44 +0000 (20:14 -0400)
The pointer 'this' is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c

index a0d67ba..486c5db 100644 (file)
@@ -3374,7 +3374,7 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
 {
        struct nfsd4_compoundres *resp = rqstp->rq_resp;
        struct nfsd4_compoundargs *argp = rqstp->rq_argp;
-       struct nfsd4_op *this = &argp->ops[resp->opcnt - 1];
+       struct nfsd4_op *this;
        struct nfsd4_compound_state *cstate = &resp->cstate;
        struct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow;
        u32 opiter;