md: stop using for_each_mddev in md_notify_reboot
authorChristoph Hellwig <hch@lst.de>
Tue, 19 Jul 2022 09:18:21 +0000 (11:18 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:44 +0000 (17:22 -0600)
commitf26514342255855f4ca3c0a92cb1cdea01c33004
tree6c83718c7dd3303b33bd5aee4cd11d51aa5246a6
parentb0e706a1ba84e50eaa714486e06e1d0027411658
md: stop using for_each_mddev in md_notify_reboot

Just do a simple list_for_each_entry_safe on all_mddevs, and only grab a
reference when we drop the lock.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c