Skip to content
Commit 823bb20a authored by David Sterba's avatar David Sterba
Browse files

btrfs: add wrapper for counting BTRFS_MAX_EXTENT_SIZE



The expression is open-coded in several places, this asks for a wrapper.
As we know the MAX_EXTENT fits to u32, we can use the appropirate
division helper. This cascades to the result type updates.

Compiler is clever enough to use shift instead of integer division, so
there's no change in the generated assembly.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 95995dbb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment