提交 99696395 编写于 作者: C Chen Wandun 提交者: Yang Yingliang

mm: fix page cache use reliable memory when reliable_debug=P

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: f5c69190 ("mm: add cmdline for the reliable memory usage of page cache")
Signed-off-by: NChen Wandun <chenwandun@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: Kefeng Wang<wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 6943b93b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册