summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2015-06-08 21:03:32 +0200
committerJ. Bruce Fields <bfields@redhat.com>2015-08-10 22:05:40 +0200
commitea126e74353453d15fc0a181910ae1e25162f2a1 (patch)
tree649da943b8d6c391f0936971897165c0003a76d7 /fs/lockd
parentsvcrdma: Change maximum server payload back to RPCSVC_MAXPAYLOAD (diff)
downloadlinux-ea126e74353453d15fc0a181910ae1e25162f2a1.tar.xz
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.c6
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);