* [PATCH] bcache: set pdev_set_uuid before scond loop iteration
@ 2020-12-24 1:53 Yi Li
2020-12-24 6:14 ` Coly Li
0 siblings, 1 reply; 2+ messages in thread
From: Yi Li @ 2020-12-24 1:53 UTC (permalink / raw)
To: colyli; +Cc: yilikernel, kent.overstreet, linux-bcache, linux-kernel, Yi Li
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcache: set pdev_set_uuid before scond loop iteration
2020-12-24 1:53 [PATCH] bcache: set pdev_set_uuid before scond loop iteration Yi Li
@ 2020-12-24 6:14 ` Coly Li
0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2020-12-24 6:14 UTC (permalink / raw)
To: Yi Li; +Cc: yilikernel, kent.overstreet, linux-bcache, linux-kernel
On 12/24/20 9:53 AM, Yi Li wrote:
> 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>
Added into my for-next directory. Thanks.
Coly Li
> ---
> 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)) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-24 6:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 1:53 [PATCH] bcache: set pdev_set_uuid before scond loop iteration Yi Li
2020-12-24 6:14 ` Coly Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).