Commit 2744c171 authored by Al Viro's avatar Al Viro

ceph: don't abuse d_delete() on failure exits

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 3a8ca1b6
...@@ -1104,7 +1104,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, ...@@ -1104,7 +1104,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,
pr_err("fill_trace bad get_inode " pr_err("fill_trace bad get_inode "
"%llx.%llx\n", vino.ino, vino.snap); "%llx.%llx\n", vino.ino, vino.snap);
err = PTR_ERR(in); err = PTR_ERR(in);
d_delete(dn); d_drop(dn);
goto done; goto done;
} }
dn = splice_dentry(dn, in, &have_lease, true); dn = splice_dentry(dn, in, &have_lease, true);
...@@ -1277,7 +1277,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, ...@@ -1277,7 +1277,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
in = ceph_get_inode(parent->d_sb, vino); in = ceph_get_inode(parent->d_sb, vino);
if (IS_ERR(in)) { if (IS_ERR(in)) {
dout("new_inode badness\n"); dout("new_inode badness\n");
d_delete(dn); d_drop(dn);
dput(dn); dput(dn);
err = PTR_ERR(in); err = PTR_ERR(in);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment