Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33541
b: refs/heads/master
c: dff02cc
h: refs/heads/master
i:
  33539: e6b34a3
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Aug 24, 2006
1 parent 6123616 commit aca97dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d67476fff2df6ff12f60b540fd0e74cf2a668f9
refs/heads/master: dff02cc1a34fcb60904a2c57cb351857cc11219e
2 changes: 1 addition & 1 deletion trunk/include/linux/sunrpc/rpc_pipe_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RPC_I(struct inode *inode)
extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);

extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *);
extern int rpc_rmdir(char *);
extern int rpc_rmdir(struct dentry *);
extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags);
extern int rpc_unlink(struct dentry *);
extern struct vfsmount *rpc_get_mount(void);
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname,

out_no_auth:
if (!IS_ERR(clnt->cl_dentry)) {
rpc_rmdir(clnt->cl_pathname);
rpc_rmdir(clnt->cl_dentry);
dput(clnt->cl_dentry);
rpc_put_mount();
}
Expand Down Expand Up @@ -320,8 +320,8 @@ rpc_destroy_client(struct rpc_clnt *clnt)
rpc_destroy_client(clnt->cl_parent);
goto out_free;
}
if (clnt->cl_pathname[0])
rpc_rmdir(clnt->cl_pathname);
if (!IS_ERR(clnt->cl_dentry))
rpc_rmdir(clnt->cl_dentry);
if (clnt->cl_xprt) {
xprt_destroy(clnt->cl_xprt);
clnt->cl_xprt = NULL;
Expand Down
18 changes: 5 additions & 13 deletions trunk/net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,28 +684,20 @@ rpc_mkdir(char *path, struct rpc_clnt *rpc_client)
}

int
rpc_rmdir(char *path)
rpc_rmdir(struct dentry *dentry)
{
struct nameidata nd;
struct dentry *dentry;
struct dentry *parent;
struct inode *dir;
int error;

if ((error = rpc_lookup_parent(path, &nd)) != 0)
return error;
dir = nd.dentry->d_inode;
parent = dget_parent(dentry);
dir = parent->d_inode;
mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len);
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
goto out_release;
}
rpc_depopulate(dentry);
error = __rpc_rmdir(dir, dentry);
dput(dentry);
out_release:
mutex_unlock(&dir->i_mutex);
rpc_release_path(&nd);
dput(parent);
return error;
}

Expand Down

0 comments on commit aca97dd

Please sign in to comment.