diff options
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 05dbccf48f6..e47876cf618 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -824,7 +824,6 @@ static void svc_age_temp_xprts(unsigned long closure) | |||
824 | struct svc_serv *serv = (struct svc_serv *)closure; | 824 | struct svc_serv *serv = (struct svc_serv *)closure; |
825 | struct svc_xprt *xprt; | 825 | struct svc_xprt *xprt; |
826 | struct list_head *le, *next; | 826 | struct list_head *le, *next; |
827 | LIST_HEAD(to_be_aged); | ||
828 | 827 | ||
829 | dprintk("svc_age_temp_xprts\n"); | 828 | dprintk("svc_age_temp_xprts\n"); |
830 | 829 | ||
@@ -845,25 +844,15 @@ static void svc_age_temp_xprts(unsigned long closure) | |||
845 | if (atomic_read(&xprt->xpt_ref.refcount) > 1 || | 844 | if (atomic_read(&xprt->xpt_ref.refcount) > 1 || |
846 | test_bit(XPT_BUSY, &xprt->xpt_flags)) | 845 | test_bit(XPT_BUSY, &xprt->xpt_flags)) |
847 | continue; | 846 | continue; |
848 | svc_xprt_get(xprt); | 847 | list_del_init(le); |
849 | list_move(le, &to_be_aged); | ||
850 | set_bit(XPT_CLOSE, &xprt->xpt_flags); | 848 | set_bit(XPT_CLOSE, &xprt->xpt_flags); |
851 | set_bit(XPT_DETACHED, &xprt->xpt_flags); | 849 | set_bit(XPT_DETACHED, &xprt->xpt_flags); |
852 | } | ||
853 | spin_unlock_bh(&serv->sv_lock); | ||
854 | |||
855 | while (!list_empty(&to_be_aged)) { | ||
856 | le = to_be_aged.next; | ||
857 | /* fiddling the xpt_list node is safe 'cos we're XPT_DETACHED */ | ||
858 | list_del_init(le); | ||
859 | xprt = list_entry(le, struct svc_xprt, xpt_list); | ||
860 | |||
861 | dprintk("queuing xprt %p for closing\n", xprt); | 850 | dprintk("queuing xprt %p for closing\n", xprt); |
862 | 851 | ||
863 | /* a thread will dequeue and close it soon */ | 852 | /* a thread will dequeue and close it soon */ |
864 | svc_xprt_enqueue(xprt); | 853 | svc_xprt_enqueue(xprt); |
865 | svc_xprt_put(xprt); | ||
866 | } | 854 | } |
855 | spin_unlock_bh(&serv->sv_lock); | ||
867 | 856 | ||
868 | mod_timer(&serv->sv_temptimer, jiffies + svc_conn_age_period * HZ); | 857 | mod_timer(&serv->sv_temptimer, jiffies + svc_conn_age_period * HZ); |
869 | } | 858 | } |