提交 caa446b2 编写于 作者: Y yu kuai 提交者: Chen Jun

fs/dirty_pages: remove set but not used variable 'm'

euler inclusion
category: feature
bugzilla: 46858
CVE: NA

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

Commit 214b35a353e7 ("fs/dirty_pages: fix kernel panic in concurrency
mode") move initialization of buffer from proc_dpages_open() to
seq_read_dirty(), and left a variable 'm' set but not used.

Fixes: 214b35a353e7 ("fs/dirty_pages: fix kernel panic in concurrency mode")
Signed-off-by: Nyu kuai <yukuai3@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Signed-off-by: NDianfang Zhang <zhangdianfang@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
上级 e30c4945
......@@ -309,18 +309,13 @@ static ssize_t write_proc(
static int proc_dpages_open(struct inode *inode, struct file *filp)
{
int ret;
struct seq_file *m;
if (buf_dirty == NULL || buf_size == 0) {
pr_warn("please allocate buffer before getting dirty pages\n");
return -ENOMEM;
}
ret = single_open(filp, proc_dpages_show, NULL);
m = filp->private_data;
return single_open(filp, proc_dpages_show, NULL);
return ret;
}
static int seq_release_dirty(struct inode *inode, struct file *file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册