Skip to content
Snippets Groups Projects
Commit 5d2fc79a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Yang Yingliang
Browse files

md: split mddev_find


stable inclusion
from linux-4.19.191
commit a61234356fcce492179427e5540bdce2abaa0191

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

commit 65aa97c4d2bfd76677c211b9d03ef05a98c6d68e upstream.

Split mddev_find into a simple mddev_find that just finds an existing
mddev by the unit number, and a more complicated mddev_find that deals
with find or allocating a mddev.

This turns out to fix this bug reported by Zhao Heming.

----------------------------- snip ------------------------------
commit d3374825 ("md: make devices disappear when they are no longer
needed.") introduced protection between mddev creating & removing. The
md_open shouldn't create mddev when all_mddevs list doesn't contain
mddev. With currently code logic, there will be very easy to trigger
soft lockup in non-preempt env.

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent b729adef
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment