Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33540
b: refs/heads/master
c: 5d67476
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Aug 24, 2006
1 parent e6b34a3 commit 6123616
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 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: a634904a7de0d3a0bc606f608007a34e8c05bfee
refs/heads/master: 5d67476fff2df6ff12f60b540fd0e74cf2a668f9
3 changes: 1 addition & 2 deletions trunk/fs/nfs/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ nfs_idmap_delete(struct nfs4_client *clp)

if (!idmap)
return;
rpc_unlink(idmap->idmap_dentry);
dput(idmap->idmap_dentry);
idmap->idmap_dentry = NULL;
rpc_unlink(idmap->idmap_path);
clp->cl_idmap = NULL;
kfree(idmap);
}
Expand Down
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 @@ -44,7 +44,7 @@ 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 struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags);
extern int rpc_unlink(char *);
extern int rpc_unlink(struct dentry *);
extern struct vfsmount *rpc_get_mount(void);
extern void rpc_put_mount(void);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,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);
dput(gss_auth->dentry);
gss_auth->dentry = NULL;
gss_mech_put(gss_auth->mech);
Expand Down
20 changes: 6 additions & 14 deletions trunk/net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,32 +746,24 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags)
}

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

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;
}
d_drop(dentry);
if (dentry->d_inode) {
rpc_close_pipes(dentry->d_inode);
error = simple_unlink(dir, dentry);
}
dput(dentry);
inode_dir_notify(dir, DN_DELETE);
out_release:
mutex_unlock(&dir->i_mutex);
rpc_release_path(&nd);
dput(parent);
return error;
}

Expand Down

0 comments on commit 6123616

Please sign in to comment.