Commit 8a5a7e2e authored by Yu Kuai's avatar Yu Kuai Committed by openeuler-sync-bot
Browse files

md/raid5: fix miscalculation of 'end_sector' in raid5_read_one_chunk()

mainline inclusion
from mainline-v6.4-rc5
commit 8557dc27
category: bugfix
bugzilla: 189405, https://gitee.com/openeuler/kernel/issues/I8LZMK

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8557dc27126949c702bd3aafe8a7e0b7e4fcb44c



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

'end_sector' is compared to 'rdev->recovery_offset', which is offset to
rdev, however, commit e82ed3a4 ("md/raid6: refactor
raid5_read_one_chunk") changes the calculation of 'end_sector' to offset
to the array. Fix this miscalculation.

Fixes: e82ed3a4 ("md/raid6: refactor raid5_read_one_chunk")
Cc: stable@vger.kernel.org # v5.12+
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230524014118.3172781-1-yukuai1@huaweicloud.com



Conflict:
	Commit 2c897e63a100 ("[Backport] md/raid6: refactor
	raid5_read_one_chunk") missed the space of the previous line.

Signed-off-by: default avatarLi Nan <linan122@huawei.com>
(cherry picked from commit 572ef3db)
parent 96cd06c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment