diff options
author | Qu Wenruo <wqu@suse.com> | 2023-07-09 15:08:18 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:13 +0200 |
commit | 52ea5bfbfa6d5432ed46e0a18b9e5ca4e4f91852 (patch) | |
tree | 7922eb4f5410080f784f9602d6a0b7fc3e0839b3 /fs/btrfs/inode.c | |
parent | b2cc440058baf3f4783a687a2caa35b31a1da553 (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 <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions