Skip to content

Commit

Permalink
ceph: don't abuse d_delete() on failure exits
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 3a8ca1b commit 2744c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
pr_err("fill_trace bad get_inode "
"%llx.%llx\n", vino.ino, vino.snap);
err = PTR_ERR(in);
d_delete(dn);
d_drop(dn);
goto done;
}
dn = splice_dentry(dn, in, &have_lease, true);
Expand Down Expand Up @@ -1277,7 +1277,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
in = ceph_get_inode(parent->d_sb, vino);
if (IS_ERR(in)) {
dout("new_inode badness\n");
d_delete(dn);
d_drop(dn);
dput(dn);
err = PTR_ERR(in);
goto out;
Expand Down

0 comments on commit 2744c17

Please sign in to comment.