]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:17 +0000 (18:19 -0400)
commit108ae1b5cdef629911891c57c8660e82aa58ac52
tree298656c1ff07138ce72f12cd84feb13201964bbd
parent7a3894ec496e0b2cebf50244f4cde264f1ae69d3
md: Don't clear MD_CLOSING when the raid is about to stop

[ Upstream commit 9674f54e41fffaf06f6a60202e1fa4cc13de3cf5 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/md.c