Commit 87cdd864 authored by Chuck Lever's avatar Chuck Lever
Browse files

SUNRPC: Remove svo_shutdown method



Clean up. Neil observed that "any code that calls svc_shutdown_net()
knows what the shutdown function should be, and so can call it
directly."

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarNeilBrown <neilb@suse.de>
parent c0219c49
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ static int make_socks(struct svc_serv *serv, struct net *net,
		printk(KERN_WARNING
			"lockd_up: makesock failed, error=%d\n", err);
	svc_shutdown_net(serv, net);
	svc_rpcb_cleanup(serv, net);
	return err;
}

@@ -287,8 +288,7 @@ static void lockd_down_net(struct svc_serv *serv, struct net *net)
			cancel_delayed_work_sync(&ln->grace_period_end);
			locks_end_grace(&ln->lockd_manager);
			svc_shutdown_net(serv, net);
			dprintk("%s: per-net data destroyed; net=%x\n",
				__func__, net->ns.inum);
			svc_rpcb_cleanup(serv, net);
		}
	} else {
		pr_err("%s: no users! net=%x\n",
@@ -351,7 +351,6 @@ static struct notifier_block lockd_inet6addr_notifier = {
#endif

static const struct svc_serv_ops lockd_sv_ops = {
	.svo_shutdown		= svc_rpcb_cleanup,
	.svo_function		= lockd,
	.svo_module		= THIS_MODULE,
};
+1 −1
Original line number Diff line number Diff line
@@ -613,7 +613,6 @@ static int nfsd_get_default_max_blksize(void)
}

static const struct svc_serv_ops nfsd_thread_sv_ops = {
	.svo_shutdown		= nfsd_last_thread,
	.svo_function		= nfsd,
	.svo_module		= THIS_MODULE,
};
@@ -724,6 +723,7 @@ void nfsd_put(struct net *net)

	if (kref_put(&nn->nfsd_serv->sv_refcnt, nfsd_noop)) {
		svc_shutdown_net(nn->nfsd_serv, net);
		nfsd_last_thread(nn->nfsd_serv, net);
		svc_destroy(&nn->nfsd_serv->sv_refcnt);
		spin_lock(&nfsd_notifier_lock);
		nn->nfsd_serv = NULL;
+0 −3
Original line number Diff line number Diff line
@@ -55,9 +55,6 @@ struct svc_pool {
struct svc_serv;

struct svc_serv_ops {
	/* Callback to use when last thread exits. */
	void		(*svo_shutdown)(struct svc_serv *, struct net *);

	/* function for service threads to run */
	int		(*svo_function)(void *);

+0 −3
Original line number Diff line number Diff line
@@ -539,9 +539,6 @@ EXPORT_SYMBOL_GPL(svc_create_pooled);
void svc_shutdown_net(struct svc_serv *serv, struct net *net)
{
	svc_close_net(serv, net);

	if (serv->sv_ops->svo_shutdown)
		serv->sv_ops->svo_shutdown(serv, net);
}
EXPORT_SYMBOL_GPL(svc_shutdown_net);