Skip to content

Commit

Permalink
sunrpc: Remove unneeded pointer dereference
Browse files Browse the repository at this point in the history
Clean up: Noticed during code inspection that there is already a
local automatic variable "xprt" so dereferencing rqst->rq_xprt
again is unnecessary.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Apr 3, 2018
1 parent 47299f7 commit 63a1b15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static void svc_xprt_release(struct svc_rqst *rqstp)
{
struct svc_xprt *xprt = rqstp->rq_xprt;

rqstp->rq_xprt->xpt_ops->xpo_release_rqst(rqstp);
xprt->xpt_ops->xpo_release_rqst(rqstp);

kfree(rqstp->rq_deferred);
rqstp->rq_deferred = NULL;
Expand Down Expand Up @@ -889,7 +889,7 @@ int svc_send(struct svc_rqst *rqstp)
goto out;

/* release the receive skb before sending the reply */
rqstp->rq_xprt->xpt_ops->xpo_release_rqst(rqstp);
xprt->xpt_ops->xpo_release_rqst(rqstp);

/* calculate over-all length */
xb = &rqstp->rq_res;
Expand Down

0 comments on commit 63a1b15

Please sign in to comment.