md: Don't clear MD_CLOSING when the raid is about to stop
authorLi Nan <linan122@huawei.com>
Mon, 26 Feb 2024 03:14:40 +0000 (11:14 +0800)
committerSong Liu <song@kernel.org>
Mon, 26 Feb 2024 18:22:22 +0000 (10:22 -0800)
commit9674f54e41fffaf06f6a60202e1fa4cc13de3cf5
treeef6528a054e1d8b11bfb72b413d43bd9dd5a7be7
parent91b26a39fb83cf370d94980609bf649c3c46993c
md: Don't clear MD_CLOSING when the raid is about to stop

The raid should not be opened anymore when it is about to be stopped.
However, other processes can open it again if the flag MD_CLOSING is
cleared before exiting. From now on, this flag will not be cleared when
the raid will be stopped.

Fixes: 065e519e71b2 ("md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop")
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240226031444.3606764-6-linan666@huaweicloud.com
drivers/md/md.c