md: do not return existing mddevs from mddev_find_or_alloc
mainline inclusion from mainline-v5.13-rc1 commit 0d809b38 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=0d809b3837a0bede8f58a67e303e339585777bf4 ------------------------------------------------- Instead of returning an existing mddev, just for it to be discarded later directly return -EEXIST. Rename the function to mddev_alloc now that it doesn't find an existing mddev. Signed-off-by:Christoph Hellwig <hch@lst.de> Signed-off-by:
Song Liu <song@kernel.org> Conflicts: Commit 4ad5f208 ("md: Flush workqueue md_rdev_misc_wq in md_alloc()") add flushing md_rdev_misc_wq in md_alloc(). Signed-off-by:
Li Lingfeng <lilingfeng3@huawei.com>
Loading
Please sign in to comment