Commit f9cfe7e
md: Fix md_seq_ops() regressions
Commit cf1b6d4 ("md: simplify md_seq_ops") introduce following
regressions:
1) If list all_mddevs is emptly, personalities and unused devices won't
be showed to user anymore.
2) If seq_file buffer overflowed from md_seq_show(), then md_seq_start()
will be called again, hence personalities will be showed to user
again.
3) If seq_file buffer overflowed from md_seq_stop(), seq_read_iter()
doesn't handle this, hence unused devices won't be showed to user.
Fix above problems by printing personalities and unused devices in
md_seq_show().
Fixes: cf1b6d4 ("md: simplify md_seq_ops")
Cc: stable@vger.kernel.org # v6.7+
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240109133957.2975272-1-yukuai1@huaweicloud.com1 parent 53889bc commit f9cfe7e
1 file changed
Lines changed: 27 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8135 | 8135 | | |
8136 | 8136 | | |
8137 | 8137 | | |
| 8138 | + | |
| 8139 | + | |
| 8140 | + | |
| 8141 | + | |
| 8142 | + | |
| 8143 | + | |
| 8144 | + | |
| 8145 | + | |
| 8146 | + | |
| 8147 | + | |
| 8148 | + | |
| 8149 | + | |
| 8150 | + | |
8138 | 8151 | | |
8139 | 8152 | | |
8140 | 8153 | | |
| |||
8276 | 8289 | | |
8277 | 8290 | | |
8278 | 8291 | | |
8279 | | - | |
8280 | | - | |
8281 | | - | |
8282 | | - | |
8283 | | - | |
8284 | | - | |
8285 | | - | |
8286 | | - | |
8287 | | - | |
8288 | 8292 | | |
8289 | | - | |
8290 | 8293 | | |
8291 | 8294 | | |
8292 | | - | |
| 8295 | + | |
8293 | 8296 | | |
8294 | 8297 | | |
8295 | 8298 | | |
| |||
8300 | 8303 | | |
8301 | 8304 | | |
8302 | 8305 | | |
8303 | | - | |
8304 | 8306 | | |
8305 | 8307 | | |
8306 | 8308 | | |
8307 | 8309 | | |
8308 | 8310 | | |
8309 | | - | |
| 8311 | + | |
8310 | 8312 | | |
8311 | 8313 | | |
8312 | 8314 | | |
| 8315 | + | |
| 8316 | + | |
| 8317 | + | |
| 8318 | + | |
| 8319 | + | |
| 8320 | + | |
| 8321 | + | |
| 8322 | + | |
8313 | 8323 | | |
8314 | 8324 | | |
8315 | 8325 | | |
| |||
8385 | 8395 | | |
8386 | 8396 | | |
8387 | 8397 | | |
| 8398 | + | |
| 8399 | + | |
| 8400 | + | |
| 8401 | + | |
8388 | 8402 | | |
8389 | 8403 | | |
8390 | 8404 | | |
| |||
0 commit comments