From c15626c6cd372e7166e77cfbf892d32245a26bf0 Mon Sep 17 00:00:00 2001 From: Jin Cai Date: Tue, 9 May 2017 17:02:13 +0800 Subject: [PATCH] osd/PG.cc: unify the call of checking whether lock is held Signed-off-by: Jin Cai --- src/osd/PG.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f8c14131f6dbe..6616ab9855d44 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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); -- 2.47.3