aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-01-11 10:18:17 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 18:20:25 -0500
commit80df9d202255071c8ec610a6a3fdca5cac69f7bd (patch)
tree140bf4a80e2ffe5d5e5601330b9a3e27e1aecf14 /net/sunrpc/auth_gss
parent70abc49b4f4a4ef04a6bd9852edbd047b480bed7 (diff)
SUNRPC: subscribe RPC clients to pipefs notifications
This patch subscribes RPC clients to RPC pipefs notifications. RPC clients notifier block is registering with pipefs initialization during SUNRPC module init. This notifier callback is responsible for RPC client PipeFS directory and GSS pipes creation. For pipes creation and destruction two additional callbacks were added to struct rpc_authops. Note that no locking required in notifier callback because PipeFS superblock pointer is passed as an argument from it's creation or destruction routine and thus we can be sure about it's validity. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 1a6fa9173519..9da2d837b512 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -762,8 +762,10 @@ static void gss_pipes_dentries_destroy(struct rpc_auth *auth)
762 struct gss_auth *gss_auth; 762 struct gss_auth *gss_auth;
763 763
764 gss_auth = container_of(auth, struct gss_auth, rpc_auth); 764 gss_auth = container_of(auth, struct gss_auth, rpc_auth);
765 rpc_unlink(gss_auth->pipe[0]->dentry); 765 if (gss_auth->pipe[0]->dentry)
766 rpc_unlink(gss_auth->pipe[1]->dentry); 766 rpc_unlink(gss_auth->pipe[0]->dentry);
767 if (gss_auth->pipe[1]->dentry)
768 rpc_unlink(gss_auth->pipe[1]->dentry);
767} 769}
768 770
769static int gss_pipes_dentries_create(struct rpc_auth *auth) 771static int gss_pipes_dentries_create(struct rpc_auth *auth)
@@ -1614,7 +1616,9 @@ static const struct rpc_authops authgss_ops = {
1614 .create = gss_create, 1616 .create = gss_create,
1615 .destroy = gss_destroy, 1617 .destroy = gss_destroy,
1616 .lookup_cred = gss_lookup_cred, 1618 .lookup_cred = gss_lookup_cred,
1617 .crcreate = gss_create_cred 1619 .crcreate = gss_create_cred,
1620 .pipes_create = gss_pipes_dentries_create,
1621 .pipes_destroy = gss_pipes_dentries_destroy,
1618}; 1622};
1619 1623
1620static const struct rpc_credops gss_credops = { 1624static const struct rpc_credops gss_credops = {