diff options
author | Gu Jinxiang <gujx@cn.fujitsu.com> | 2018-01-11 16:12:17 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-26 15:09:37 +0200 |
commit | 019599ada73ce8ac0b0d60705819eba95df54630 (patch) | |
tree | 77c7afe257c53adfdcd5a08f5db1ec00f4643638 /fs | |
parent | c1c3fac2a95b14e36333528e408e76d90c93bbf7 (diff) |
btrfs: use reada direction enum instead of constant value in populate_free_space_tree
populate_free_space_tree calls function btrfs_search_slot_for_read with
parameter int find_higher = 1, it means that, if no exact match is
found, then use the next higher item. So in function
populate_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 <gujx@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/free-space-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c index fe5e0324dca9..d7b6c0017143 100644 --- a/fs/btrfs/free-space-tree.c +++ b/fs/btrfs/free-space-tree.c @@ -1071,7 +1071,7 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans, path = btrfs_alloc_path(); if (!path) return -ENOMEM; - path->reada = 1; + path->reada = READA_FORWARD; path2 = btrfs_alloc_path(); if (!path2) { |