nfsd/sunrpc: factor svc_rqst allocation and freeing from sv_nrthreads refcounting
Subsystems (3)
RFC PATCH v4 7/7 nfsd/sunrpc: factor svc_rqst allocation and freeing from sv_nrthreads refcounting
From: Jeff Layton <[email protected]>
In later patches, we'll want to be able to allocate and free svc_rqst structures without monkeying with the serv->sv_nrthreads refcount.
Factor those pieces out of their respective functions.
Signed-off-by Shirley Ma <[email protected]>
Acked-by Jeff Layton <[email protected]>
Tested-by Shirley Ma <[email protected]>
---
include/linux/sunrpc/svc.h +3 -0
@@ -458,8 +458,11 @@ void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net);int svc_bind (struct svc_serv *serv,struct net *net);struct svc_serv *svc_create (struct svc_program *,unsigned int ,struct svc_serv_ops *); +struct svc_rqst *svc_rqst_alloc (struct svc_serv *serv, +struct svc_pool *pool,int node);struct svc_rqst *svc_prepare_thread (struct svc_serv *serv,struct svc_pool *pool,int node); +void svc_rqst_free (struct svc_rqst *);void svc_exit_thread (struct svc_rqst *);unsigned int svc_pool_map_get (void );void svc_pool_map_put (void );
net/sunrpc/svc.c +36 -18
98 lines not on this page · raw message