aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2023-02-07 11:57:23 -0500
committerDavid Sterba <[email protected]>2023-04-17 18:01:13 +0200
commit6989627db074a3db0ca297657bcb8709d8c888c0 (patch)
treeedb2b50c4b3e24ff3eed16adf01dcb7f45868471 /tools/perf/scripts/python/bin
parenta13bb2c03848e4f96f10486ba0b76f8d398bc71c (diff)
btrfs: drop root refs properly when orphan cleanup fails
When we mount the file system we do something like this: while (1) { lookup fs roots; for (i = 0; i < num_roots; i++) { ret = btrfs_orphan_cleanup(roots[i]); if (ret) break; btrfs_put_root(roots[i]); } } for (; i < num_roots; i++) btrfs_put_root(roots[i]); As you can see if we break in that inner loop we just go back to the outer loop and lose the fact that we have to drop references on the remaining roots we looked up. Fix this by making an out label and jumping to that on error so we don't leak a reference to the roots we looked up. Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions