crimson: fix remove_from_lru assert

RETIRED_PLACEHOLDER extent also put into retired set, when do
commit_retire_extent need check if it is RETIRED_PLACEHOLDER,
otherwise will cause remove_from_lru assert.

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
This commit is contained in:
chunmei-liu 2022-01-24 09:12:00 -08:00
parent e8791ca367
commit 3cdc82cf98

View File

@ -673,7 +673,7 @@ void Cache::remove_extent(CachedExtentRef ref)
assert(ref->is_valid());
if (ref->is_dirty()) {
remove_from_dirty(ref);
} else {
} else if (!ref->is_placeholder()) {
lru.remove_from_lru(*ref);
}
extents.erase(*ref);