lockd: create and use per-net NSM RPC clients on MON/UNMON requests
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Tue, 18 Sep 2012 09:37:23 +0000 (13:37 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:32:38 +0000 (09:32 -0700)
commit4f7ae03ec5e40b8755a1ea3080cf1bca388d4ded
treec6186adb91296a2094a04b5e28af883a41193af3
parent66fad5377c6b06e24512035bb81095dc4787bc02
lockd: create and use per-net NSM RPC clients on MON/UNMON requests

commit cb7323fffa85df37161f4d3be45e1f787808309c upstream.

NSM RPC client can be required on NFSv3 umount, when child reaper is dying
(and destroying it's mount namespace). It means, that current nsproxy is set
to NULL already, but creation of RPC client requires UTS namespace for gaining
hostname string.

This patch creates reference-counted per-net NSM client on first monitor
request and destroys it after last unmonitor request.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/lockd/mon.c