[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>
This commit is contained in:
committed by
Trond Myklebust
parent
470056c288
commit
278c995c8a
@@ -87,7 +87,6 @@ struct gss_auth {
|
||||
struct list_head upcalls;
|
||||
struct rpc_clnt *client;
|
||||
struct dentry *dentry;
|
||||
char path[48];
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
@@ -690,10 +689,8 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
|
||||
if (err)
|
||||
goto err_put_mech;
|
||||
|
||||
snprintf(gss_auth->path, sizeof(gss_auth->path), "%s/%s",
|
||||
clnt->cl_pathname,
|
||||
gss_auth->mech->gm_name);
|
||||
gss_auth->dentry = rpc_mkpipe(gss_auth->path, clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN);
|
||||
gss_auth->dentry = rpc_mkpipe(clnt->cl_dentry, gss_auth->mech->gm_name,
|
||||
clnt, &gss_upcall_ops, RPC_PIPE_WAIT_FOR_OPEN);
|
||||
if (IS_ERR(gss_auth->dentry)) {
|
||||
err = PTR_ERR(gss_auth->dentry);
|
||||
goto err_put_mech;
|
||||
@@ -718,7 +715,7 @@ gss_destroy(struct rpc_auth *auth)
|
||||
auth, auth->au_flavor);
|
||||
|
||||
gss_auth = container_of(auth, struct gss_auth, rpc_auth);
|
||||
rpc_unlink(gss_auth->path);
|
||||
rpc_unlink(gss_auth->dentry);
|
||||
gss_mech_put(gss_auth->mech);
|
||||
|
||||
rpcauth_free_credcache(auth);
|
||||
|
Reference in New Issue
Block a user