Skip to content

Commit e809270

Browse files
cybertanaxboe
authored andcommitted
bcache: set pdev_set_uuid before scond loop iteration
There is no need to reassign pdev_set_uuid in the second loop iteration, so move it to the place before second loop. Signed-off-by: Yi Li <[email protected]> Signed-off-by: Coly Li <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 02f938e commit e809270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/bcache/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2644,8 +2644,8 @@ static ssize_t bch_pending_bdevs_cleanup(struct kobject *k,
26442644
}
26452645

26462646
list_for_each_entry_safe(pdev, tpdev, &pending_devs, list) {
2647+
char *pdev_set_uuid = pdev->dc->sb.set_uuid;
26472648
list_for_each_entry_safe(c, tc, &bch_cache_sets, list) {
2648-
char *pdev_set_uuid = pdev->dc->sb.set_uuid;
26492649
char *set_uuid = c->set_uuid;
26502650

26512651
if (!memcmp(pdev_set_uuid, set_uuid, 16)) {

0 commit comments

Comments
 (0)