diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-05-07 14:12:02 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-07-11 15:33:24 +0200 |
commit | 58147d5a7072dbf5f392ad8b2d5328b105e0e48d (patch) | |
tree | 291109e79cb5fdc455f6da65dd76fa858d4d7367 /fs/open.c | |
parent | 45c4102f0d827e00ce6ca107a7cb158265d706da (diff) | |
download | linux-58147d5a7072dbf5f392ad8b2d5328b105e0e48d.tar.gz linux-58147d5a7072dbf5f392ad8b2d5328b105e0e48d.tar.bz2 linux-58147d5a7072dbf5f392ad8b2d5328b105e0e48d.zip |
btrfs: don't do extra find_extent_buffer() in do_walk_down()
We do find_extent_buffer(), and then if we don't find the eb in cache we
call btrfs_find_create_tree_block(), which calls find_extent_buffer()
first and then allocates the extent buffer.
The reason we're doing this is because if we don't find the extent
buffer in cache we set reada = 1. However this doesn't matter, because
lower down we only trigger reada if !btrfs_buffer_uptodate(eb), which is
what the case would be if we didn't find the extent buffer in cache and
had to allocate it.
Clean this up to simply call btrfs_find_create_tree_block(), and then
use the fact that we're having to read the extent buffer off of disk to
go ahead and kick off readahead.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/open.c')
0 files changed, 0 insertions, 0 deletions