From: Chen Wandun chenwandun@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA
--------------------------------
If reliable_debug=P, page cache should not use reliable memory.
Fixes: f5c691902452 ("mm: add cmdline for the reliable memory usage of page cache") Signed-off-by: Chen Wandun chenwandun@huawei.com Reviewed-by: Xie XiuQi xiexiuqi@huawei.com Reviewed-by: Kefeng Wangwangkefeng.wang@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- mm/mem_reliable.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/mm/mem_reliable.c b/mm/mem_reliable.c index dcdd937148b60..f27c79bbb0f4c 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -475,6 +475,9 @@ void page_cache_prepare_alloc(gfp_t *gfp) if (!mem_reliable_is_enabled()) return;
+ if (!pagecache_reliable_is_enabled()) + goto no_reliable; + for_each_possible_cpu(cpu) nr_reliable += this_cpu_read(pagecache_reliable_pages);