diff options
author | Christoph Hellwig <hch@infradead.org> | 2005-07-24 18:53:01 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:57 -0400 |
commit | 278c995c8a153bb2a9bc427e931cfb9c8034c9d7 (patch) | |
tree | fe1b62d1686c78659133d751393ab2d5acf38665 /net/sunrpc/auth_gss | |
parent | 470056c288334eb0b37be26c9ff8aee37ed1cc7a (diff) |
[PATCH] RPC,NFS: new rpc_pipefs patch
Currently rpc_mkdir/rpc_rmdir and rpc_mkpipe/mk_unlink have an API that's
a little unfortunate. They take a path relative to the rpc_pipefs root and
thus need to perform a full lookup. If you look at debugfs or usbfs they
always store the dentry for directories they created and thus can pass in
a dentry + single pathname component pair into their equivalents of the
above functions.
And in fact rpc_pipefs actually stores a dentry for all but one component so
this change not only simplifies the core rpc_pipe code but also the callers.
Unfortuntately this code path is only used by the NFS4 idmapper and
AUTH_GSSAPI for which I don't have a test enviroment. Could someone give
it a spin? It's the last bit needed before we can rework the
lookup_hash API
Signed-off-by: Christoph Hellwig <hch@lst.de>
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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index d2b08f16c257..bd2555139fa9 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -87,7 +87,6 @@ struct gss_auth { | |||
87 | struct list_head upcalls; | 87 | struct list_head upcalls; |
88 | struct rpc_clnt *client; | 88 | struct rpc_clnt *client; |
89 | struct dentry *dentry; | 89 | struct dentry *dentry; |
90 | char path[48]; | ||
91 | spinlock_t lock; | 90 | spinlock_t lock; |
92 | }; | 91 | }; |
93 | 92 | ||
@@ -690,10 +689,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) | |||
690 | if (err) | 689 | if (err) |
691 | goto err_put_mech; | 690 | goto err_put_mech; |
692 | 691 | ||
693 | snprintf(gss_auth->path, sizeof(gss_auth->path), "%s/%s", | 692 | gss_auth->dentry = rpc_mkpipe(clnt->cl_dentry, gss_auth->mech->gm_name, |
694 | clnt->cl_pathname, | 693 | clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN); |
695 | gss_auth->mech->gm_name); | ||
696 | gss_auth->dentry = rpc_mkpipe(gss_auth->path, clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN); | ||
697 | if (IS_ERR(gss_auth->dentry)) { | 694 | if (IS_ERR(gss_auth->dentry)) { |
698 | err = PTR_ERR(gss_auth->dentry); | 695 | err = PTR_ERR(gss_auth->dentry); |
699 | goto err_put_mech; | 696 | goto err_put_mech; |
@@ -718,7 +715,7 @@ gss_destroy(struct rpc_auth *auth) | |||
718 | auth, auth->au_flavor); | 715 | auth, auth->au_flavor); |
719 | 716 | ||
720 | gss_auth = container_of(auth, struct gss_auth, rpc_auth); | 717 | gss_auth = container_of(auth, struct gss_auth, rpc_auth); |
721 | rpc_unlink(gss_auth->path); | 718 | rpc_unlink(gss_auth->dentry); |
722 | gss_mech_put(gss_auth->mech); | 719 | gss_mech_put(gss_auth->mech); |
723 | 720 | ||
724 | rpcauth_free_credcache(auth); | 721 | rpcauth_free_credcache(auth); |