提交 88c47666 编写于 作者: S Stanislav Kinsbursky 提交者: J. Bruce Fields

nfsd: pass proper net to nfsd_destroy() from NFSd kthreads

Since NFSd service is per-net now, we have to pass proper network
context in nfsd_shutdown() from NFSd kthreads.

The simplest way I found is to get proper net from one of transports
with permanent sockets.
Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 541e864f
......@@ -541,6 +541,8 @@ static int
nfsd(void *vrqstp)
{
struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp;
struct svc_xprt *perm_sock = list_entry(rqstp->rq_server->sv_permsocks.next, typeof(struct svc_xprt), xpt_list);
struct net *net = perm_sock->xpt_net;
int err;
/* Lock module and set up kernel thread */
......@@ -605,7 +607,7 @@ nfsd(void *vrqstp)
/* Release the thread */
svc_exit_thread(rqstp);
nfsd_destroy(&init_net);
nfsd_destroy(net);
/* Release module */
mutex_unlock(&nfsd_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册