summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2025-03-20 13:07:31 +1030
committerDavid Sterba <dsterba@suse.com>2025-05-15 14:30:38 +0200
commitafe990fb59c152adef5a80c9168e990e2610b1f7 (patch)
tree83abe653a97ebaaef94e2a81f87f47476144d835 /tools/perf/scripts/python
parent563bd2b78581313599f7ca63d3a07b8b81a3fb01 (diff)
downloadlinux-afe990fb59c152adef5a80c9168e990e2610b1f7.tar.gz
linux-afe990fb59c152adef5a80c9168e990e2610b1f7.zip
btrfs: cleanup the reserved space inside loop of btrfs_buffered_write()
Inside the main loop of btrfs_buffered_write(), if something wrong happened, there is a out-of-loop cleanup path to release the reserved space. This behavior saves some code lines, but makes it much harder to read, as we need to check release_bytes to make sure when we need to do the cleanup. Factor out the cleanup part into a helper, release_reserved_space(), to do the cleanup inside the main loop, so that we can move @release_bytes inside the loop. This will make later refactoring of the main loop much easier. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions