]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor: StoreConverter: sanitize 'store' pointer on init
authorJoao Eduardo Luis <joao.luis@inktank.com>
Tue, 16 Jul 2013 15:46:53 +0000 (16:46 +0100)
committerSage Weil <sage@inktank.com>
Tue, 16 Jul 2013 17:32:14 +0000 (10:32 -0700)
We are supposed to have umount'ed the store and set the pointer to NULL.
We should not tolerate any other case on init().

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/mon/Monitor.h

index 5bf0c0ef962f75a2e9d6cfb8811d1dcf1134768d..82b08816702b0d00f01d6b5295a91e35917c8d2a 100644 (file)
@@ -788,6 +788,7 @@ public:
     bool _check_gv_store();
 
     void _init() {
+      assert(!store);
       MonitorStore *store_ptr = new MonitorStore(path);
       store.reset(store_ptr);
     }