]> git.baikalelectronics.ru Git - kernel.git/commit
md: refactor mddev_find_or_alloc
authorChristoph Hellwig <hch@lst.de>
Mon, 12 Apr 2021 08:05:29 +0000 (10:05 +0200)
committerSong Liu <song@kernel.org>
Thu, 15 Apr 2021 18:06:32 +0000 (11:06 -0700)
commit5747a5072ef240b861f2878ac75619294167f170
tree9e3b39fbce20c5f69c28cd6fd230847e659ab094
parent8376e4f2c0a6998cf038287b1c4325c95c904375
md: refactor mddev_find_or_alloc

Allocate the new mddev first speculatively, which greatly simplifies
the code flow.

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