|
@@ -1132,8 +1132,12 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)
|
|
|
if (IS_ERR(realdn)) {
|
|
|
pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
|
|
|
PTR_ERR(realdn), dn, in, ceph_vinop(in));
|
|
|
- dput(dn);
|
|
|
- dn = realdn; /* note realdn contains the error */
|
|
|
+ dn = realdn;
|
|
|
+ /*
|
|
|
+ * Caller should release 'dn' in the case of error.
|
|
|
+ * If 'req->r_dentry' is passed to this function,
|
|
|
+ * caller should leave 'req->r_dentry' untouched.
|
|
|
+ */
|
|
|
goto out;
|
|
|
} else if (realdn) {
|
|
|
dout("dn %p (%d) spliced with %p (%d) "
|