md: factor out a mddev_find_locked helper from mddev_find
authorChristoph Hellwig <hch@lst.de>
Sat, 3 Apr 2021 16:15:28 +0000 (18:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:40:21 +0000 (10:40 +0200)
commite5f2afec1fe0ad1e4acbb55acf0e1c4e2b34af62
tree281060889ca2ed96f64c1b5a88169b9b93187266
parent830ba94cc8a5614cc31178244d5bd801dda56661
md: factor out a mddev_find_locked helper from mddev_find

commit 8b57251f9a91f5e5a599de7549915d2d226cc3af upstream.

Factor out a self-contained helper to just lookup a mddev by the dev_t
"unit".

Cc: stable@vger.kernel.org
Reviewed-by: Heming Zhao <heming.zhao@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.c