summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorYi Li <yili@winhong.com>2021-01-04 10:41:18 +0300
committerJens Axboe <axboe@kernel.dk>2021-01-09 19:21:03 +0300
commite80927079fd97b4d5457e3af2400a0087b561564 (patch)
tree01422c26125f7fd2f890e7fdab74b76d5bb50728 /drivers/md
parent02f938e9fed1681791605ca8b96c2d9da9355f6a (diff)
downloadlinux-e80927079fd97b4d5457e3af2400a0087b561564.tar.xz
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 <yili@winhong.com> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bcache/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index a4752ac410dc..6aa23a6fb394 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2644,8 +2644,8 @@ static ssize_t bch_pending_bdevs_cleanup(struct kobject *k,
}
list_for_each_entry_safe(pdev, tpdev, &pending_devs, list) {
+ char *pdev_set_uuid = pdev->dc->sb.set_uuid;
list_for_each_entry_safe(c, tc, &bch_cache_sets, list) {
- char *pdev_set_uuid = pdev->dc->sb.set_uuid;
char *set_uuid = c->set_uuid;
if (!memcmp(pdev_set_uuid, set_uuid, 16)) {