summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-04-25 18:22:40 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-02 10:30:48 -0700
commitfeab18eb28ec4c93c0762b7407b616d19ab9ad8b (patch)
tree1dc89a5c6ad65782dcb551090134795d778033d0 /fs
parent97ed537eaa6ff11c9a1df342364e25d0996bc117 (diff)
downloadlinux-3.10-feab18eb28ec4c93c0762b7407b616d19ab9ad8b.tar.gz
linux-3.10-feab18eb28ec4c93c0762b7407b616d19ab9ad8b.tar.bz2
linux-3.10-feab18eb28ec4c93c0762b7407b616d19ab9ad8b.zip
LockD: pass service to per-net up and down functions
commit 4db77695bf5738bdafa83d1b58b64cbecc6f55e7 upstream. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Cc: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/lockd/svc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 3250f280a17..58ddc38cfcc 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -251,10 +251,9 @@ out_err:
return err;
}
-static int lockd_up_net(struct net *net)
+static int lockd_up_net(struct svc_serv *serv, struct net *net)
{
struct lockd_net *ln = net_generic(net, lockd_net_id);
- struct svc_serv *serv = nlmsvc_rqst->rq_server;
int error;
if (ln->nlmsvc_users++)
@@ -276,10 +275,9 @@ err_rpcb:
return error;
}
-static void lockd_down_net(struct net *net)
+static void lockd_down_net(struct svc_serv *serv, struct net *net)
{
struct lockd_net *ln = net_generic(net, lockd_net_id);
- struct svc_serv *serv = nlmsvc_rqst->rq_server;
if (ln->nlmsvc_users) {
if (--ln->nlmsvc_users == 0) {
@@ -307,7 +305,7 @@ int lockd_up(struct net *net)
* Check whether we're already up and running.
*/
if (nlmsvc_rqst) {
- error = lockd_up_net(net);
+ error = lockd_up_net(nlmsvc_rqst->rq_server, net);
goto out;
}
@@ -378,7 +376,7 @@ out:
return error;
err_start:
- lockd_down_net(net);
+ lockd_down_net(serv, net);
goto destroy_and_out;
}
EXPORT_SYMBOL_GPL(lockd_up);
@@ -390,7 +388,7 @@ void
lockd_down(struct net *net)
{
mutex_lock(&nlmsvc_mutex);
- lockd_down_net(net);
+ lockd_down_net(nlmsvc_rqst->rq_server, net);
if (nlmsvc_users) {
if (--nlmsvc_users)
goto out;