diff options
author | Ming-Hung Tsai <mtsai@redhat.com> | 2024-12-05 14:41:52 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-12-13 16:37:39 +0300 |
commit | 626f128ee9c4133b1cfce4be2b34a1508949370e (patch) | |
tree | 9ad31f3900f568149f07bad3b8a933fd2eaca5e2 /tools/perf/scripts/python/task-analyzer.py | |
parent | f2893c0804d86230ffb8f1c8703fdbb18648abc8 (diff) | |
download | linux-626f128ee9c4133b1cfce4be2b34a1508949370e.tar.xz |
dm array: fix unreleased btree blocks on closing a faulty array cursor
The cached block pointer in dm_array_cursor might be NULL if it reaches
an unreadable array block, or the array is empty. Therefore,
dm_array_cursor_end() should call dm_btree_cursor_end() unconditionally,
to prevent leaving unreleased btree blocks.
This fix can be verified using the "array_cursor/iterate/empty" test
in dm-unit:
dm-unit run /pdata/array_cursor/iterate/empty --kernel-dir <KERNEL_DIR>
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: fdd1315aa5f0 ("dm array: introduce cursor api")
Reviewed-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions