diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 312895788036705cb0426d1af5b5662a4797faf3..4d1d8dfb2d2a4d1de7d6ee59e2b8d802a68827e5 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1274,7 +1274,7 @@ static int flash_devs_run(struct cache_set *c) struct uuid_entry *u; for (u = c->uuids; - u < c->uuids + c->devices_max_used && !ret; + u < c->uuids + c->nr_uuids && !ret; u++) if (UUID_FLASH_ONLY(u)) ret = flash_dev_run(c, u);