aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/svc_xprt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index dcd2d1ee2e3c..912dea558ccc 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -710,10 +710,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
710 spin_unlock_bh(&pool->sp_lock); 710 spin_unlock_bh(&pool->sp_lock);
711 711
712 len = 0; 712 len = 0;
713 if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) { 713 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
714 dprintk("svc_recv: found XPT_CLOSE\n");
715 svc_delete_xprt(xprt);
716 } else if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
717 struct svc_xprt *newxpt; 714 struct svc_xprt *newxpt;
718 newxpt = xprt->xpt_ops->xpo_accept(xprt); 715 newxpt = xprt->xpt_ops->xpo_accept(xprt);
719 if (newxpt) { 716 if (newxpt) {
@@ -739,7 +736,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
739 svc_xprt_received(newxpt); 736 svc_xprt_received(newxpt);
740 } 737 }
741 svc_xprt_received(xprt); 738 svc_xprt_received(xprt);
742 } else { 739 } else if (!test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
743 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n", 740 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n",
744 rqstp, pool->sp_id, xprt, 741 rqstp, pool->sp_id, xprt,
745 atomic_read(&xprt->xpt_ref.refcount)); 742 atomic_read(&xprt->xpt_ref.refcount));
@@ -752,6 +749,11 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
752 dprintk("svc: got len=%d\n", len); 749 dprintk("svc: got len=%d\n", len);
753 } 750 }
754 751
752 if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
753 dprintk("svc_recv: found XPT_CLOSE\n");
754 svc_delete_xprt(xprt);
755 }
756
755 /* No data, incomplete (TCP) read, or accept() */ 757 /* No data, incomplete (TCP) read, or accept() */
756 if (len == 0 || len == -EAGAIN) { 758 if (len == 0 || len == -EAGAIN) {
757 rqstp->rq_res.len = 0; 759 rqstp->rq_res.len = 0;