diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-11-17 17:02:57 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-12-01 14:45:26 -0500 |
commit | 8d65ef760d50cc625c5364cba89be838b21c66a7 (patch) | |
tree | 1dc8c55fb7f4a35370f98fec7fe51bbbe893e265 /net/sunrpc/svc_xprt.c | |
parent | 56429e9b3be567a173bd05f5594faf8522c34d3a (diff) |
sunrpc: eliminate the XPT_DETACHED flag
All it does is indicate whether a xprt has already been deleted from
a list or not, which is unnecessary since we use list_del_init and it's
always set and checked under the sv_lock anyway.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index c179ca2a5aa4..97a75c17142b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -884,7 +884,6 @@ static void svc_age_temp_xprts(unsigned long closure) | |||
884 | continue; | 884 | continue; |
885 | list_del_init(le); | 885 | list_del_init(le); |
886 | set_bit(XPT_CLOSE, &xprt->xpt_flags); | 886 | set_bit(XPT_CLOSE, &xprt->xpt_flags); |
887 | set_bit(XPT_DETACHED, &xprt->xpt_flags); | ||
888 | dprintk("queuing xprt %p for closing\n", xprt); | 887 | dprintk("queuing xprt %p for closing\n", xprt); |
889 | 888 | ||
890 | /* a thread will dequeue and close it soon */ | 889 | /* a thread will dequeue and close it soon */ |
@@ -924,8 +923,7 @@ static void svc_delete_xprt(struct svc_xprt *xprt) | |||
924 | xprt->xpt_ops->xpo_detach(xprt); | 923 | xprt->xpt_ops->xpo_detach(xprt); |
925 | 924 | ||
926 | spin_lock_bh(&serv->sv_lock); | 925 | spin_lock_bh(&serv->sv_lock); |
927 | if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags)) | 926 | list_del_init(&xprt->xpt_list); |
928 | list_del_init(&xprt->xpt_list); | ||
929 | WARN_ON_ONCE(!list_empty(&xprt->xpt_ready)); | 927 | WARN_ON_ONCE(!list_empty(&xprt->xpt_ready)); |
930 | if (test_bit(XPT_TEMP, &xprt->xpt_flags)) | 928 | if (test_bit(XPT_TEMP, &xprt->xpt_flags)) |
931 | serv->sv_tmpcnt--; | 929 | serv->sv_tmpcnt--; |