提交 7fc5d61c 编写于 作者: Z zhong jiang 提交者: Xie XiuQi

pagecache: Use correct 'cpu' to deal with the background work.

euler inclusion
category: bugfix
CVE: NA
Bugzilla: 13084

---------------------------

When user modify the cache_reclaim_s, cache_reclaim_sysctl_handler
will modify the work delay time. we fail to initialize the 'cpu'.

The patch should mod_delayed_work instead of mod_delayed_work to
fix the issue.
Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
Reviewed-by: NJing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5d42e091
......@@ -4049,14 +4049,14 @@ int cache_reclaim_enable_handler(struct ctl_table *table, int write,
int cache_reclaim_sysctl_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos)
{
int ret, cpu;
int ret;
ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
if (ret)
return ret;
if (write)
mod_delayed_work_on(cpu, system_wq, &shepherd,
mod_delayed_work(system_wq, &shepherd,
round_jiffies_relative(
(unsigned long)vm_cache_reclaim_s * HZ));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册