]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: fix recursive locking when queueing commit callback; simplify
authorSage Weil <sage@newdream.net>
Tue, 4 Nov 2008 19:45:53 +0000 (11:45 -0800)
committerSage Weil <sage@newdream.net>
Tue, 4 Nov 2008 20:08:47 +0000 (12:08 -0800)
src/os/JournalingObjectStore.h

index 015275ad624cd3af559825c13ac942a0c5712aff..9e21da977a52842bb310d1e55c19cb18ea556dfc 100644 (file)
@@ -80,13 +80,6 @@ protected:
     }
   }
 
-  void queue_commit_waiter(Context *oncommit) {
-    Mutex::Locker l(lock);
-
-    if (oncommit) 
-      commit_waiters[op_seq].push_back(oncommit);
-  }
-
   void journal_transaction(ObjectStore::Transaction& t, Context *onsafe) {
     Mutex::Locker l(lock);
 
@@ -95,8 +88,8 @@ protected:
       bufferlist tbl;
       t.encode(tbl);
       journal->submit_entry(op_seq, tbl, onsafe);
-    } else
-      queue_commit_waiter(onsafe);
+    } else if (onsafe) 
+      commit_waiters[op_seq].push_back(onsafe);
   }
 
 public: