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>
This commit is contained in:

committed by
Trond Myklebust

parent
70abc49b4f
commit
80df9d2022
@@ -762,8 +762,10 @@ static void gss_pipes_dentries_destroy(struct rpc_auth *auth)
|
||||
struct gss_auth *gss_auth;
|
||||
|
||||
gss_auth = container_of(auth, struct gss_auth, rpc_auth);
|
||||
rpc_unlink(gss_auth->pipe[0]->dentry);
|
||||
rpc_unlink(gss_auth->pipe[1]->dentry);
|
||||
if (gss_auth->pipe[0]->dentry)
|
||||
rpc_unlink(gss_auth->pipe[0]->dentry);
|
||||
if (gss_auth->pipe[1]->dentry)
|
||||
rpc_unlink(gss_auth->pipe[1]->dentry);
|
||||
}
|
||||
|
||||
static int gss_pipes_dentries_create(struct rpc_auth *auth)
|
||||
@@ -1614,7 +1616,9 @@ static const struct rpc_authops authgss_ops = {
|
||||
.create = gss_create,
|
||||
.destroy = gss_destroy,
|
||||
.lookup_cred = gss_lookup_cred,
|
||||
.crcreate = gss_create_cred
|
||||
.crcreate = gss_create_cred,
|
||||
.pipes_create = gss_pipes_dentries_create,
|
||||
.pipes_destroy = gss_pipes_dentries_destroy,
|
||||
};
|
||||
|
||||
static const struct rpc_credops gss_credops = {
|
||||
|
Reference in New Issue
Block a user