summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-03-03 13:41:51 +0300
committerDavid Sterba <dsterba@suse.com>2021-03-15 18:57:12 +0300
commitfbf48bb0b197e6894a04c714728c952af7153bf3 (patch)
tree05f4ed21c55a0c5cb1319aa5602d6760494d3ce7 /tools/perf/scripts/python/export-to-sqlite.py
parentd2dcc8ed8ec650a793e81d8b2222146eb6ddd84f (diff)
downloadlinux-fbf48bb0b197e6894a04c714728c952af7153bf3.tar.xz
btrfs: track qgroup released data in own variable in insert_prealloc_file_extent
There is a piece of weird code in insert_prealloc_file_extent(), which looks like: ret = btrfs_qgroup_release_data(inode, file_offset, len); if (ret < 0) return ERR_PTR(ret); if (trans) { ret = insert_reserved_file_extent(trans, inode, file_offset, &stack_fi, true, ret); ... } extent_info.is_new_extent = true; extent_info.qgroup_reserved = ret; ... Note how the variable @ret is abused here, and if anyone is adding code just after btrfs_qgroup_release_data() call, it's super easy to overwrite the @ret and cause tons of qgroup related bugs. Fix such abuse by introducing new variable @qgroup_released, so that we won't reuse the existing variable @ret. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions