Commit 8d65ef76 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields

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: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 56429e9b
...@@ -63,10 +63,9 @@ struct svc_xprt { ...@@ -63,10 +63,9 @@ struct svc_xprt {
#define XPT_CHNGBUF 7 /* need to change snd/rcv buf sizes */ #define XPT_CHNGBUF 7 /* need to change snd/rcv buf sizes */
#define XPT_DEFERRED 8 /* deferred request pending */ #define XPT_DEFERRED 8 /* deferred request pending */
#define XPT_OLD 9 /* used for xprt aging mark+sweep */ #define XPT_OLD 9 /* used for xprt aging mark+sweep */
#define XPT_DETACHED 10 /* detached from tempsocks list */ #define XPT_LISTENER 10 /* listening endpoint */
#define XPT_LISTENER 11 /* listening endpoint */ #define XPT_CACHE_AUTH 11 /* cache auth info */
#define XPT_CACHE_AUTH 12 /* cache auth info */ #define XPT_LOCAL 12 /* connection from loopback interface */
#define XPT_LOCAL 13 /* connection from loopback interface */
struct svc_serv *xpt_server; /* service for transport */ struct svc_serv *xpt_server; /* service for transport */
atomic_t xpt_reserved; /* space on outq that is rsvd */ atomic_t xpt_reserved; /* space on outq that is rsvd */
......
...@@ -884,7 +884,6 @@ static void svc_age_temp_xprts(unsigned long closure) ...@@ -884,7 +884,6 @@ static void svc_age_temp_xprts(unsigned long closure)
continue; continue;
list_del_init(le); list_del_init(le);
set_bit(XPT_CLOSE, &xprt->xpt_flags); set_bit(XPT_CLOSE, &xprt->xpt_flags);
set_bit(XPT_DETACHED, &xprt->xpt_flags);
dprintk("queuing xprt %p for closing\n", xprt); dprintk("queuing xprt %p for closing\n", xprt);
/* a thread will dequeue and close it soon */ /* a thread will dequeue and close it soon */
...@@ -924,8 +923,7 @@ static void svc_delete_xprt(struct svc_xprt *xprt) ...@@ -924,8 +923,7 @@ static void svc_delete_xprt(struct svc_xprt *xprt)
xprt->xpt_ops->xpo_detach(xprt); xprt->xpt_ops->xpo_detach(xprt);
spin_lock_bh(&serv->sv_lock); spin_lock_bh(&serv->sv_lock);
if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags)) list_del_init(&xprt->xpt_list);
list_del_init(&xprt->xpt_list);
WARN_ON_ONCE(!list_empty(&xprt->xpt_ready)); WARN_ON_ONCE(!list_empty(&xprt->xpt_ready));
if (test_bit(XPT_TEMP, &xprt->xpt_flags)) if (test_bit(XPT_TEMP, &xprt->xpt_flags))
serv->sv_tmpcnt--; serv->sv_tmpcnt--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment