From: Jin Cai Date: Tue, 9 May 2017 09:02:13 +0000 (+0800) Subject: osd/PG.cc: unify the call of checking whether lock is held X-Git-Tag: v12.0.3~46^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15013%2Fhead;p=ceph.git osd/PG.cc: unify the call of checking whether lock is held Signed-off-by: Jin Cai --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f8c14131f6d..6616ab9855d 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);