Skip to content

Commit 7ce311d

Browse files
Gu JinXiangkdave
authored andcommitted
btrfs: use reada direction enum instead of constant value in load_free_space_tree
load_free_space_tree calls either function load_free_space_bitmaps or load_free_space_extents. And either of those two will lead to call btrfs_next_item. So in function load_free_space_tree, use READA_FORWARD to read forward ahead. This also changes the value from READA_BACK to READA_FORWARD, since according to the logic, it should reada_for_search forward, not backward. Signed-off-by: Gu JinXiang <[email protected]> Reviewed-by: Nikolay Borisov <[email protected]> [ update changelog ] Signed-off-by: David Sterba <[email protected]>
1 parent 019599a commit 7ce311d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/free-space-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ int load_free_space_tree(struct btrfs_caching_control *caching_ctl)
15731573
*/
15741574
path->skip_locking = 1;
15751575
path->search_commit_root = 1;
1576-
path->reada = 1;
1576+
path->reada = READA_FORWARD;
15771577

15781578
info = search_free_space_info(NULL, fs_info, block_group, path, 0);
15791579
if (IS_ERR(info)) {

0 commit comments

Comments
 (0)