mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
nfsd/sunrpc: add a new svc_serv_ops struct and move sv_shutdown into it
In later patches we'll need to abstract out more operations on a per-service level, besides sv_shutdown and sv_function. Declare a new svc_serv_ops struct to hold these operations, and move sv_shutdown into this struct. Signed-off-by: Shirley Ma <[email protected]> Acked-by: Jeff Layton <[email protected]> Tested-by: Shirley Ma <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
cc9a903d91
commit
ea126e7435
5 changed files with 33 additions and 22 deletions
|
|
@ -322,6 +322,10 @@ out_rqst:
|
|||
return error;
|
||||
}
|
||||
|
||||
static struct svc_serv_ops lockd_sv_ops = {
|
||||
.svo_shutdown = svc_rpcb_cleanup,
|
||||
};
|
||||
|
||||
static struct svc_serv *lockd_create_svc(void)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
|
|
@ -350,7 +354,7 @@ static struct svc_serv *lockd_create_svc(void)
|
|||
nlm_timeout = LOCKD_DFLT_TIMEO;
|
||||
nlmsvc_timeout = nlm_timeout * HZ;
|
||||
|
||||
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, svc_rpcb_cleanup);
|
||||
serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, &lockd_sv_ops);
|
||||
if (!serv) {
|
||||
printk(KERN_WARNING "lockd_up: create service failed\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
Loading…
Reference in a new issue