ceph: don't abuse d_delete() on failure exits
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 01:41:05 +0000 (21:41 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 02:20:20 +0000 (22:20 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ceph/inode.c

index 4b5762ef7c2bf87ecb937a70a55ae20b100d77c9..ba95eea201bf1ef8e809159d6b41019fb9169752 100644 (file)
@@ -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);
@@ -1277,7 +1277,7 @@ retry_lookup:
                        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;