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>
 
                        d++;
                        if (d == conf->raid_disks * 2)
                                d = 0;
-               } while (!success && d != read_disk);
+               } while (d != read_disk);
 
                if (!success) {
                        /* Cannot read from anywhere - mark it bad */
 
                        sl++;
                        if (sl == conf->copies)
                                sl = 0;
-               } while (!success && sl != slot);
+               } while (sl != slot);
                rcu_read_unlock();
 
                if (!success) {