OSDN Git Service

md: remove redundant check in fix_read_error()
authorLi Nan <linan122@huawei.com>
Fri, 23 Jun 2023 17:32:35 +0000 (01:32 +0800)
committerSong Liu <song@kernel.org>
Thu, 27 Jul 2023 07:13:30 +0000 (00:13 -0700)
commit02c67a3b72b13951c2ca134bd7065f03ec57946d
tree203ee6021774545997a747b8da10074fd727486d
parent605eeda6e70f692311b36180f217208d367476f6
md: remove redundant check in fix_read_error()

In fix_read_error(), 'success' will be checked immediately after assigning
it, if it is set to 1 then the loop will break. Checking it again in
condition of loop is redundant. Clean it up.

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