md/raid10: optimize fix_read_error
authorLi Nan <linan122@huawei.com>
Fri, 23 Jun 2023 17:32:34 +0000 (01:32 +0800)
committerSong Liu <song@kernel.org>
Thu, 27 Jul 2023 07:13:30 +0000 (00:13 -0700)
commit605eeda6e70f692311b36180f217208d367476f6
tree27d5a58768101c22def615c27975c0569049aa72
parentffb1e7a03f966065323b18c96da23a2118a19529
md/raid10: optimize fix_read_error

We dereference r10_bio->read_slot too many times in fix_read_error().
Optimize it by using a variable to store read_slot.

Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20230623173236.2513554-2-linan666@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid10.c