md: factor out a mddev_alloc_unit helper from mddev_find
authorChristoph Hellwig <hch@lst.de>
Mon, 12 Apr 2021 08:05:28 +0000 (10:05 +0200)
committerSong Liu <song@kernel.org>
Thu, 15 Apr 2021 18:06:32 +0000 (11:06 -0700)
commit85c8c3c1f8d9e31f626c93435dd91c2f85603e07
tree2f14090222401d2f37ffa085555d940ab75f9ef4
parentf8ee34a929a4adf6d29a7ef2145393e6865037ad
md: factor out a mddev_alloc_unit helper from mddev_find

Split out a self contained helper to find a free minor for the md
"unit" number.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md.c