]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: fix prematurely released lock in RadosModel
authorJohn Spray <john.spray@redhat.com>
Sun, 24 Aug 2014 17:17:59 +0000 (18:17 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:20 +0000 (01:34 +0100)
Should hold this lock while touching context->snaps.  Don't
think this has anything to do with #9203 though.

Signed-off-by: John Spray <john.spray@redhat.com>
src/test/osd/RadosModel.h

index af8e4bbcd99796456f36500b45723e6fdcbdb57c..55347bd5e4579fcf075b179636836216b7fb2909 100644 (file)
@@ -1244,7 +1244,6 @@ public:
     context->state_lock.Lock();
     uint64_t snap = context->snaps[to_remove];
     context->remove_snap(to_remove);
-    context->state_lock.Unlock();
 
     if (context->pool_snaps) {
       string snapname;
@@ -1268,6 +1267,7 @@ public:
        assert(0);
       }
     }
+    context->state_lock.Unlock();
   }
 
   string getType()