aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2023-07-09 15:08:18 +0800
committerDavid Sterba <[email protected]>2023-08-21 14:52:13 +0200
commit52ea5bfbfa6d5432ed46e0a18b9e5ca4e4f91852 (patch)
tree7922eb4f5410080f784f9602d6a0b7fc3e0839b3 /fs/btrfs/inode.c
parentb2cc440058baf3f4783a687a2caa35b31a1da553 (diff)
btrfs: move eb subpage preallocation out of the loop
Initially we preallocate btrfs_subpage structure in the main loop of alloc_extent_buffer(). But later commit fbca46eb46ec ("btrfs: make nodesize >= PAGE_SIZE case to reuse the non-subpage routine") has made sure we only go subpage routine if our nodesize is smaller than PAGE_SIZE. This means for that case, we only need to allocate the subpage structure once anyway. So this patch would make the preallocation out of the main loop. This would slightly reduce the workload when we hold the page lock, and make code a little easier to read. Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions