]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix unlink new snaprealm check
authorSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 17:59:09 +0000 (10:59 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 7 Jun 2011 17:59:09 +0000 (10:59 -0700)
The bool was flipped.

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

index 1071a88863b4e804a01972d4170f55dc6ea2bf7c..0add6dfdb340f39db15dea8e89f5faab1f27b623 100644 (file)
@@ -4456,7 +4456,7 @@ void Server::_unlink_local_finish(MDRequest *mdr,
     dout(20) << " straydn is " << *straydn << dendl;
     straydnl = straydn->pop_projected_linkage();
     
-    snap_is_new = straydnl->get_inode()->snaprealm ? false : true;
+    snap_is_new = straydnl->get_inode()->snaprealm ? true : false;
     mdcache->touch_dentry_bottom(straydn);
   }
 
@@ -4464,7 +4464,7 @@ void Server::_unlink_local_finish(MDRequest *mdr,
   mdr->apply();
 
   if (snap_is_new) //only new if straydnl exists
-      mdcache->do_realm_invalidate_and_update_notify(straydnl->get_inode(), CEPH_SNAP_OP_SPLIT, true);
+    mdcache->do_realm_invalidate_and_update_notify(straydnl->get_inode(), CEPH_SNAP_OP_SPLIT, true);
   
   mds->mdcache->send_dentry_unlink(dn, straydn);