diff options
author | Jeff Layton <jlayton@primarydata.com> | 2015-06-08 12:03:32 -0700 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-08-10 16:05:40 -0400 |
commit | ea126e74353453d15fc0a181910ae1e25162f2a1 (patch) | |
tree | 649da943b8d6c391f0936971897165c0003a76d7 /fs/lockd | |
parent | cc9a903d915c21626b6b2fbf8ed0ff16a7f82210 (diff) | |
download | talos-op-linux-ea126e74353453d15fc0a181910ae1e25162f2a1.tar.gz talos-op-linux-ea126e74353453d15fc0a181910ae1e25162f2a1.zip |
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 <shirley.ma@oracle.com>
Acked-by: Jeff Layton <jlayton@primarydata.com>
Tested-by: Shirley Ma <shirley.ma@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/svc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 55505cbe11af..4182b2f925cd 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -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); |