aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2021-05-19 10:52:45 -0400
committerDavid Sterba <[email protected]>2021-05-27 23:30:49 +0200
commitb86652be7c83f70bf406bed18ecf55adb9bfb91b (patch)
treea9b2a386d63c91761f4aecff6239b196f7c58f57 /tools/perf/scripts/python/exported-sql-viewer.py
parent4c80a97d7b02cf68e169118ef2bda0725fc87f6f (diff)
btrfs: fix error handling in btrfs_del_csums
Error injection stress would sometimes fail with checksums on disk that did not have a corresponding extent. This occurred because the pattern in btrfs_del_csums was while (1) { ret = btrfs_search_slot(); if (ret < 0) break; } ret = 0; out: btrfs_free_path(path); return ret; If we got an error from btrfs_search_slot we'd clear the error because we were breaking instead of goto out. Instead of using goto out, simply handle the cases where we may leave a random value in ret, and get rid of the ret = 0; out: pattern and simply allow break to have the proper error reporting. With this fix we properly abort the transaction and do not commit thinking we successfully deleted the csum. Reviewed-by: Qu Wenruo <[email protected]> CC: [email protected] # 4.4+ 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/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions