From: "Yan, Zheng" <[email protected]>

If the underwater dentry is a remove link, we shouldn't mark the
inode clean

Signed-off-by: Yan, Zheng <[email protected]>
---
 src/mds/CDir.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc
index 4ef6e8f..9b49c10 100644
--- a/src/mds/CDir.cc
+++ b/src/mds/CDir.cc
@@ -1651,7 +1651,7 @@ void CDir::_fetched(bufferlist &bl, const string& want_dn)
       dout(10) << "_fetched  had underwater dentry " << *dn << ", marking 
clean" << dendl;
       dn->mark_clean();
 
-      if (dn->get_linkage()->get_inode()) {
+      if (dn->get_linkage()->is_primary()) {
        assert(dn->get_linkage()->get_inode()->get_version() <= 
got_fnode.version);
        dout(10) << "_fetched  had underwater inode " << 
*dn->get_linkage()->get_inode() << ", marking clean" << dendl;
        dn->get_linkage()->get_inode()->mark_clean();
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to