]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix state check in Migrator::find_stale_export_freeze()
authorYan, Zheng <zyan@redhat.com>
Mon, 21 Nov 2016 11:32:25 +0000 (19:32 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 21 Nov 2016 12:42:31 +0000 (20:42 +0800)
Iterator p is pointing to next state

Possibly fix: http://tracker.ceph.com/issues/{17606,8405}
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/Migrator.cc

index 0e9de762dd753c698360415d1a4be2891b2fa929..edd7e5a3d67d76f999981a113fd2cc7e8ef21d5b 100644 (file)
@@ -244,8 +244,7 @@ void Migrator::find_stale_export_freeze()
     CDir* dir = p->first;
     export_state_t& stat = p->second;
     ++p;
-    if (p->second.state != EXPORT_DISCOVERING &&
-       p->second.state != EXPORT_FREEZING)
+    if (stat.state != EXPORT_DISCOVERING && stat.state != EXPORT_FREEZING)
       continue;
     if (stat.last_cum_auth_pins != dir->get_cum_auth_pins()) {
       stat.last_cum_auth_pins = dir->get_cum_auth_pins();