diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2007-12-30 21:08:25 -0600 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:13 -0500 |
commit | 18d19f949d5a9c927b2b88402630c5137971b619 (patch) | |
tree | f66d3366d322c2fa78166bf6a4164c7caf7d14bd /net | |
parent | 57b1d3babaafea1c395c932914e38c2ff9493001 (diff) | |
download | blackbird-op-linux-18d19f949d5a9c927b2b88402630c5137971b619.tar.gz blackbird-op-linux-18d19f949d5a9c927b2b88402630c5137971b619.zip |
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')
-rw-r--r-- | net/sunrpc/svcsock.c | 24 |
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) static void svc_check_conn_limits(struct svc_serv *serv) { if (serv->sv_tmpcnt > (serv->sv_nrthreads+3)*20) { - struct svc_sock *svsk = NULL; + struct svc_xprt *xprt = NULL; spin_lock_bh(&serv->sv_lock); if (!list_empty(&serv->sv_tempsocks)) { if (net_ratelimit()) { /* Try to help the admin */ - printk(KERN_NOTICE "%s: too many open TCP " - "sockets, consider increasing the " + printk(KERN_NOTICE "%s: too many open " + "connections, consider increasing the " "number of nfsd threads\n", serv->sv_name); } /* - * Always select the oldest socket. It's not fair, + * Always select the oldest connection. It's not fair, * but so is life */ - svsk = list_entry(serv->sv_tempsocks.prev, - struct svc_sock, - sk_xprt.xpt_list); - set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); - svc_xprt_get(&svsk->sk_xprt); + xprt = list_entry(serv->sv_tempsocks.prev, + struct svc_xprt, + xpt_list); + set_bit(XPT_CLOSE, &xprt->xpt_flags); + svc_xprt_get(xprt); } spin_unlock_bh(&serv->sv_lock); - if (svsk) { - svc_xprt_enqueue(&svsk->sk_xprt); - svc_xprt_put(&svsk->sk_xprt); + if (xprt) { + svc_xprt_enqueue(xprt); + svc_xprt_put(xprt); } } } |