aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2007-12-30 22:08:25 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 16:42:13 -0500
commit18d19f949d5a9c927b2b88402630c5137971b619 (patch)
treef66d3366d322c2fa78166bf6a4164c7caf7d14bd /net/sunrpc
parent57b1d3babaafea1c395c932914e38c2ff9493001 (diff)
svc: Make svc_check_conn_limits xprt independent
The svc_check_conn_limits function only manipulates xprt fields. Change references to svc_sock->sk_xprt to svc_xprt directly. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svcsock.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 157de9979cfe..0814a78ad7ad 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1448,31 +1448,31 @@ svc_sock_update_bufs(struct svc_serv *serv)
1448static void svc_check_conn_limits(struct svc_serv *serv) 1448static void svc_check_conn_limits(struct svc_serv *serv)
1449{ 1449{
1450 if (serv->sv_tmpcnt > (serv->sv_nrthreads+3)*20) { 1450 if (serv->sv_tmpcnt > (serv->sv_nrthreads+3)*20) {
1451 struct svc_sock *svsk = NULL; 1451 struct svc_xprt *xprt = NULL;
1452 spin_lock_bh(&serv->sv_lock); 1452 spin_lock_bh(&serv->sv_lock);
1453 if (!list_empty(&serv->sv_tempsocks)) { 1453 if (!list_empty(&serv->sv_tempsocks)) {
1454 if (net_ratelimit()) { 1454 if (net_ratelimit()) {
1455 /* Try to help the admin */ 1455 /* Try to help the admin */
1456 printk(KERN_NOTICE "%s: too many open TCP " 1456 printk(KERN_NOTICE "%s: too many open "
1457 "sockets, consider increasing the " 1457 "connections, consider increasing the "
1458 "number of nfsd threads\n", 1458 "number of nfsd threads\n",
1459 serv->sv_name); 1459 serv->sv_name);
1460 } 1460 }
1461 /* 1461 /*
1462 * Always select the oldest socket. It's not fair, 1462 * Always select the oldest connection. It's not fair,
1463 * but so is life 1463 * but so is life
1464 */ 1464 */
1465 svsk = list_entry(serv->sv_tempsocks.prev, 1465 xprt = list_entry(serv->sv_tempsocks.prev,
1466 struct svc_sock, 1466 struct svc_xprt,
1467 sk_xprt.xpt_list); 1467 xpt_list);
1468 set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); 1468 set_bit(XPT_CLOSE, &xprt->xpt_flags);
1469 svc_xprt_get(&svsk->sk_xprt); 1469 svc_xprt_get(xprt);
1470 } 1470 }
1471 spin_unlock_bh(&serv->sv_lock); 1471 spin_unlock_bh(&serv->sv_lock);
1472 1472
1473 if (svsk) { 1473 if (xprt) {
1474 svc_xprt_enqueue(&svsk->sk_xprt); 1474 svc_xprt_enqueue(xprt);
1475 svc_xprt_put(&svsk->sk_xprt); 1475 svc_xprt_put(xprt);
1476 } 1476 }
1477 } 1477 }
1478} 1478}