aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/dir.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 77eeb768f95a..0411dbb15815 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -670,14 +670,17 @@ int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry)
670 /* 670 /*
671 * We created the item, then did a lookup, and found 671 * We created the item, then did a lookup, and found
672 * it was already linked to another inode we already 672 * it was already linked to another inode we already
673 * had in our cache (and thus got spliced). Link our 673 * had in our cache (and thus got spliced). To not
674 * dentry to that inode, but don't hash it, just in 674 * confuse VFS (especially when inode is a directory),
675 * case the VFS wants to dereference it. 675 * we don't link our dentry to that inode, return an
676 * error instead.
677 *
678 * This event should be rare and it happens only when
679 * we talk to old MDS. Recent MDS does not send traceless
680 * reply for request that creates new inode.
676 */ 681 */
677 BUG_ON(!result->d_inode);
678 d_instantiate(dentry, result->d_inode);
679 d_drop(result); 682 d_drop(result);
680 return 0; 683 return -ESTALE;
681 } 684 }
682 return PTR_ERR(result); 685 return PTR_ERR(result);
683} 686}