diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-10-12 10:26:40 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 21:59:08 +0100 |
| commit | b917a94a4c085a307069790a0527f9492fc70700 (patch) | |
| tree | 1ce981db08e126c29e22209e20be5ed513c83c8d /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 28fe58ce6a20aa674076645bcfc1be126a12ed4b (diff) | |
btrfs: consistently round up or down i_size in btrfs_truncate()
We're using different ways to round down the i_size by sector size, one
with a bitwise and with a negated mask and another with ALIGN_DOWN(), and
using ALIGN() to round up.
Replace these uses with the round_down() and round_up() macros which have
have names that make it clear the direction of the rounding (unlike the
ALIGN() macro) and getting rid of the bitwise and, negated mask and local
variable for the mask.
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
