From: yu kuai yukuai3@huawei.com
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: yu kuai yukuai3@huawei.com Reviewed-by: zhangyi (F) yi.zhang@huawei.com Signed-off-by: yangerkun yangerkun@huawei.com Signed-off-by: Dianfang Zhang zhangdianfang@huawei.com --- fs/dirty_pages.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/dirty_pages.c b/fs/dirty_pages.c index ed4d3346da3b..0e718ead417f 100644 --- a/fs/dirty_pages.c +++ b/fs/dirty_pages.c @@ -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)