Commit 6c6292c2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Li Lingfeng
Browse files

md: refactor mddev_find_or_alloc

mainline inclusion
from mainline-v5.13-rc1
commit d144fe6f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8O6NL
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d144fe6ff176d79efd411e520103a99e11874c36



-------------------------------------------------

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

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
parent 38f910c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment