Commit 57173bd4 authored by Zhong Jinghua's avatar Zhong Jinghua Committed by Jialin Zhang
Browse files

md/raid6: Fix the problem of repeatedly applying for memory in raid5_read_one_chunk

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6OSXU



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

commit "md/raid6: refactor raid5_read_one_chunk" incorrectly merged the
code.
Repeatedly applying for memory leads to memory leaks.

Fix it by removing redundant allocating memory code.

Fixes: c13c2cd2 ("md/raid6: refactor raid5_read_one_chunk")
Signed-off-by: default avatarZhong Jinghua <zhongjinghua@huawei.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent c61374c2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5429,7 +5429,6 @@ static int raid5_read_one_chunk(struct mddev *mddev, struct bio *raid_bio)
	atomic_inc(&rdev->nr_pending);
	rcu_read_unlock();

	align_bio = bio_clone_fast(raid_bio, GFP_NOIO, &mddev->bio_set);
	align_bio = bio_clone_fast(raid_bio, GFP_NOIO, &mddev->io_acct_set);
	md_io_acct = container_of(align_bio, struct md_io_acct, bio_clone);
	raid_bio->bi_next = (void *)rdev;