summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2025-10-12 10:39:08 +0100
committerDavid Sterba <dsterba@suse.com>2025-11-24 21:59:09 +0100
commit3b7c0c20b72003238ea3e17e60e357513be8edaf (patch)
tree7d21831d6d941a8ed9c6032c39f62ad09ad0c317 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parentb917a94a4c085a307069790a0527f9492fc70700 (diff)
btrfs: avoid multiple i_size rounding in btrfs_truncate()
We have the inode locked so no one can concurrently change its i_size and neither do we change it ourselves, so there's no point in keep rounding it in the while loop and setting it up in the control structure. That only causes confusion when reading the code. So move all the i_size setup and rounding out of the loop and assert the inode is locked. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Anand Jain <asj@kernel.org> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions