]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: rename: fix oldin pop
authorSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 18:25:39 +0000 (11:25 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 18:25:39 +0000 (11:25 -0700)
- make the pop match position with the project in prepare
- don't pop on linkmerge, since we don't project in that case

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/Server.cc

index 4ea399faaf5f84a2b933f2108770e178e8af5604..30801f1eba60376a76de20d9ee9b1b6270f3e33d 100644 (file)
@@ -5338,6 +5338,8 @@ void Server::_rename_apply(MDRequest *mdr, CDentry *srcdn, CDentry *destdn, CDen
       }
     } else if (destdnl->is_remote()) {
       destdn->get_dir()->unlink_inode(destdn);
+      if (oldin->is_auth())
+       oldin->pop_and_dirty_projected_inode(mdr->ls);
     }
   }
 
@@ -5358,8 +5360,6 @@ void Server::_rename_apply(MDRequest *mdr, CDentry *srcdn, CDentry *destdn, CDen
       dout(10) << "merging remote onto primary link" << dendl;
       srcdn->get_dir()->unlink_inode(srcdn);
     }
-    if (destdnl->get_inode()->is_auth())
-      destdnl->get_inode()->pop_and_dirty_projected_inode(mdr->ls);
   } else {
     if (linkmerge) {
       dout(10) << "merging primary onto remote link" << dendl;