]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG.cc: unify the call of checking whether lock is held 15013/head
authorJin Cai <caijin.caij@alibaba-inc.com>
Tue, 9 May 2017 09:02:13 +0000 (17:02 +0800)
committerJin Cai <caijin.caij@alibaba-inc.com>
Tue, 9 May 2017 09:03:03 +0000 (17:03 +0800)
Signed-off-by: Jin Cai <caijin.caij@alibaba-inc.com>
src/osd/PG.cc

index f8c14131f6dbe1040552c1e2696ae231ca743822..6616ab9855d44136e75886825abc0758ce960f86 100644 (file)
@@ -2005,7 +2005,7 @@ void PG::queue_recovery(bool front)
 
 bool PG::queue_scrub()
 {
-  assert(_lock.is_locked());
+  assert(is_locked());
   if (is_scrubbing()) {
     return false;
   }
@@ -3496,7 +3496,7 @@ void PG::requeue_map_waiters()
 bool PG::sched_scrub()
 {
   bool nodeep_scrub = false;
-  assert(_lock.is_locked());
+  assert(is_locked());
   if (!(is_primary() && is_active() && is_clean() && !is_scrubbing())) {
     return false;
   }
@@ -4570,7 +4570,7 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle)
 
 void PG::scrub_clear_state()
 {
-  assert(_lock.is_locked());
+  assert(is_locked());
   state_clear(PG_STATE_SCRUBBING);
   state_clear(PG_STATE_REPAIR);
   state_clear(PG_STATE_DEEP_SCRUB);