[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201224015355.358211-1-yili@winhong.com>
Date: Thu, 24 Dec 2020 09:53:55 +0800
From: Yi Li <yili@...hong.com>
To: colyli@...e.de
Cc: yilikernel@...il.com, kent.overstreet@...il.com,
linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org,
Yi Li <yili@...hong.com>
Subject: [PATCH] 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@...hong.com>
---
drivers/md/bcache/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
--
2.25.3
Powered by blists - more mailing lists