Skip to contentSkip to conversation

nfs41: sunrpc: xs_tcp_read_callback() should use xprt_force_disconnect()

PATCH In review Ricardo Labiaga 2 participants 2 messages May 26, 2009 – May 28, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs41: sunrpc: xs_tcp_read_callback() should use xprt_force_disconnect()

xs_tcp_read_callback() drops the connection when the number of expected callbacks is exceeded. Use xprt_force_disconnect(), ensuring tasks on the pending queue are awaken on disconnect.

---
 net/sunrpc/xprtsock.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
net/sunrpc/xprtsock.c +1 -6
index 1a268bf..7445d4b 100644
@@ -1147,13 +1147,8 @@ static inline int xs_tcp_read_callback(struct rpc_xprt *xprt,
 
 	req = xprt_alloc_bc_request(xprt);
 	if (req == NULL) {
-		/*
-		 * Schedule an autoclose RPC call
-		 */
 		printk(KERN_WARNING "Callback slot table overflowed\n");
-		set_bit(XPRT_CLOSE_WAIT, &xprt->state);
-		if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
-			queue_work(rpciod_workqueue, &xprt->task_cleanup);
+		xprt_force_disconnect(xprt);
 		return -1;
 	}
 
Signature · 1 line
1.5.4.3
#1 lore raw

Merged onto my nfs41-all and nfs41-for-{2.6.31,next} branches.

Thanks!

Benny

Quoted 28 lines · Ricardo Labiaga

xs_tcp_read_callback() drops the connection when the number of expected callbacks is exceeded. Use xprt_force_disconnect(), ensuring tasks on the pending queue are awaken on disconnect.

---
 net/sunrpc/xprtsock.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
net/sunrpc/xprtsock.c +1 -6
index 1a268bf..7445d4b 100644
@@ -1147,13 +1147,8 @@ static inline int xs_tcp_read_callback(struct rpc_xprt *xprt,
 
 	req = xprt_alloc_bc_request(xprt);
 	if (req == NULL) {
-		/*
-		 * Schedule an autoclose RPC call
-		 */
 		printk(KERN_WARNING "Callback slot table overflowed\n");
-		set_bit(XPRT_CLOSE_WAIT, &xprt->state);
-		if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0)
-			queue_work(rpciod_workqueue, &xprt->task_cleanup);
+		xprt_force_disconnect(xprt);
 		return -1;
 	}