Commit c9f7cb5
md: don't leave 'MD_RECOVERY_FROZEN' in error path of md_set_readonly()
If md_set_readonly() failed, the array could still be read-write, however
'MD_RECOVERY_FROZEN' could still be set, which leave the array in an
abnormal state that sync or recovery can't continue anymore.
Hence make sure the flag is cleared after md_set_readonly() returns.
Fixes: 88724bf ("md: wait for pending superblock updates before switching to read-only")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231205094215.1824240-3-yukuai1@huaweicloud.com1 parent f2d87a7 commit c9f7cb5
1 file changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6355 | 6355 | | |
6356 | 6356 | | |
6357 | 6357 | | |
| 6358 | + | |
| 6359 | + | |
| 6360 | + | |
6358 | 6361 | | |
6359 | 6362 | | |
6360 | 6363 | | |
| |||
6369 | 6372 | | |
6370 | 6373 | | |
6371 | 6374 | | |
6372 | | - | |
6373 | | - | |
6374 | 6375 | | |
6375 | 6376 | | |
6376 | 6377 | | |
| |||
6383 | 6384 | | |
6384 | 6385 | | |
6385 | 6386 | | |
6386 | | - | |
6387 | | - | |
6388 | | - | |
6389 | | - | |
6390 | | - | |
6391 | 6387 | | |
6392 | 6388 | | |
6393 | 6389 | | |
| 6390 | + | |
6394 | 6391 | | |
6395 | 6392 | | |
6396 | 6393 | | |
6397 | | - | |
6398 | | - | |
| 6394 | + | |
| 6395 | + | |
6399 | 6396 | | |
| 6397 | + | |
| 6398 | + | |
6400 | 6399 | | |
6401 | 6400 | | |
| 6401 | + | |
| 6402 | + | |
| 6403 | + | |
| 6404 | + | |
6402 | 6405 | | |
6403 | 6406 | | |
6404 | 6407 | | |
6405 | 6408 | | |
6406 | | - | |
6407 | 6409 | | |
6408 | | - | |
| 6410 | + | |
6409 | 6411 | | |
6410 | 6412 | | |
6411 | 6413 | | |
| |||
0 commit comments