nfsd needs to be able to remove a particular entry from its list of transports. Suggested-by: Jeff Layton <jlayton@xxxxxxxxxx> Signed-off-by: Olga Kornievskaia <okorniev@xxxxxxxxxx> --- include/linux/sunrpc/svc.h | 1 + net/sunrpc/svc_xprt.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 74658cca0f38..0bc0b9ead01e 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -444,6 +444,7 @@ int svc_register(const struct svc_serv *, struct net *, const int, const unsigned short, const unsigned short); void svc_wake_up(struct svc_serv *); +void svc_xprt_dequeue_entry(struct svc_xprt *xprt); void svc_reserve(struct svc_rqst *rqstp, int space); void svc_pool_wake_idle_thread(struct svc_pool *pool); struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv); diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 06779b4cdd0a..7b86e69df08b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -507,6 +507,17 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool) return xprt; } +void svc_xprt_dequeue_entry(struct svc_xprt *xprt) +{ + struct svc_pool *pool; + + pool = svc_pool_for_cpu(xprt->xpt_server); + + WARN_ON_ONCE(pool->sp_xprts.ready); + llist_del_entry(&pool->sp_xprts.new, &xprt->xpt_ready.node); +} +EXPORT_SYMBOL_GPL(svc_xprt_dequeue_entry); + /** * svc_reserve - change the space reserved for the reply to a request. * @rqstp: The request in question -- 2.47.1