dn, atomic_read(&dn->d_count), in, ceph_vinop(in));
if (prehash)
*prehash = false; /* don't rehash on error */
+ dn = realdn; /* note realdn contains the error */
goto out;
} else if (realdn) {
dout(10, "dn %p (%d) spliced with %p (%d) "
dn, dn->d_inode, ceph_vinop(dn->d_inode));
in = dn->d_inode;
} else {
+ struct dentry *newdn;
in = ceph_get_inode(dn->d_sb, vino);
if (IS_ERR(in)) {
derr(30, "get_inode badness\n");
dn = NULL;
goto out_dir_no_inode;
}
- dn = splice_dentry(dn, in, &have_lease);
+ newdn = splice_dentry(dn, in, &have_lease);
+
+ if (IS_ERR(newdn)) {
+ goto no_mutex_find_alias;
+ }
+ dn = newdn;
}
if (have_lease)
in = NULL;
break;
}
+ no_mutex_find_alias:
existing = d_find_alias(in);
if (existing) {
if (dn)