diff options
Diffstat (limited to 'src/mds/ScatterLock.h')
-rw-r--r-- | src/mds/ScatterLock.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mds/ScatterLock.h b/src/mds/ScatterLock.h index d9ffada083f..f52bd1425cb 100644 --- a/src/mds/ScatterLock.h +++ b/src/mds/ScatterLock.h @@ -164,15 +164,18 @@ public: } } void apply_stale() { - if (state == LOCK_MIX_STALE) - set_stale(); - else if (is_stale() && state == LOCK_MIX) + if (state == LOCK_MIX && is_stale()) { state = LOCK_MIX_STALE; + clear_stale(); + } } - void set_and_apply_stale() { - set_stale(); - if (state == LOCK_MIX) + void set_or_apply_stale() { + if (state == LOCK_MIX) { state = LOCK_MIX_STALE; + clear_stale(); + } else { + set_stale(); + } } void set_last_scatter(utime_t t) { more()->last_scatter = t; } |