From 272e594fc5f44a3636ec572d5510063e5403b383 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Sat, 31 Oct 2026 17:24:40 +0100 Subject: [PATCH] classifier: Fix slab page detection The slab page type is set only on the head page, so for compound pages of higher order the detection mechanism needs to check the type of compoud_head(). Signed-off-by: Robert Baldyga --- modules/cas_cache/classifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cas_cache/classifier.c b/modules/cas_cache/classifier.c index e25b3861a..17a6834a7 100644 --- a/modules/cas_cache/classifier.c +++ b/modules/cas_cache/classifier.c @@ -58,7 +58,7 @@ static cas_cls_eval_t _cas_cls_metadata_test(struct cas_classifier *cls, if (PageAnon(io->page)) return cas_cls_eval_no; - if (PageSlab(io->page)) { + if (PageSlab(compound_head(io->page))) { /* A filesystem issues IO on pages that does not belongs * to the file page cache. It means that it is a * part of metadata @@ -1280,7 +1280,7 @@ static void _cas_cls_get_bio_context(struct bio *bio, if (PageAnon(page)) return; - if (PageSlab(page)) + if (PageSlab(compound_head(page))) return; mapping = cas_page_mapping(page);