md: don't call bitmap_create() while array is quiesced.
authorNeilBrown <neilb@suse.com>
Tue, 17 Oct 2017 02:46:43 +0000 (13:46 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Jul 2018 13:30:50 +0000 (15:30 +0200)
commitcc091f3fbbdb117d819536d6249e34322f991899
treefe603863c49db59c19fbfdad45f793813117750d
parente44e4cf3a8dbfee3f6e078f254c26e5a5168c6a2
md: don't call bitmap_create() while array is quiesced.

commit 52a0d49de3d592a3118e13f35985e3d99eaf43df upstream.

bitmap_create() allocates memory with GFP_KERNEL and
so can wait for IO.
If called while the array is quiesced, it could wait indefinitely
for write out to the array - deadlock.
So call bitmap_create() before quiescing the array.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.c