aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r--net/sunrpc/svc_xprt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 818c4c365b28..8f0f1fb3dc52 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -706,7 +706,10 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
706 spin_unlock_bh(&pool->sp_lock); 706 spin_unlock_bh(&pool->sp_lock);
707 707
708 len = 0; 708 len = 0;
709 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) { 709 if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
710 dprintk("svc_recv: found XPT_CLOSE\n");
711 svc_delete_xprt(xprt);
712 } else if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
710 struct svc_xprt *newxpt; 713 struct svc_xprt *newxpt;
711 newxpt = xprt->xpt_ops->xpo_accept(xprt); 714 newxpt = xprt->xpt_ops->xpo_accept(xprt);
712 if (newxpt) { 715 if (newxpt) {
@@ -732,7 +735,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
732 svc_xprt_received(newxpt); 735 svc_xprt_received(newxpt);
733 } 736 }
734 svc_xprt_received(xprt); 737 svc_xprt_received(xprt);
735 } else if (!test_bit(XPT_CLOSE, &xprt->xpt_flags)) { 738 } else {
736 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n", 739 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n",
737 rqstp, pool->sp_id, xprt, 740 rqstp, pool->sp_id, xprt,
738 atomic_read(&xprt->xpt_ref.refcount)); 741 atomic_read(&xprt->xpt_ref.refcount));
@@ -745,11 +748,6 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
745 dprintk("svc: got len=%d\n", len); 748 dprintk("svc: got len=%d\n", len);
746 } 749 }
747 750
748 if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
749 dprintk("svc_recv: found XPT_CLOSE\n");
750 svc_delete_xprt(xprt);
751 }
752
753 /* No data, incomplete (TCP) read, or accept() */ 751 /* No data, incomplete (TCP) read, or accept() */
754 if (len == 0 || len == -EAGAIN) { 752 if (len == 0 || len == -EAGAIN) {
755 rqstp->rq_res.len = 0; 753 rqstp->rq_res.len = 0;