Commit 2f5239dc authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: remove btrfs_path::recurse

With my async free space cache loading patches ("btrfs: load free space
cache asynchronously") we no longer have a user of path->recurse and can
remove it.
Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0e46318d
...@@ -2533,7 +2533,7 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root, ...@@ -2533,7 +2533,7 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root,
* We don't know the level of the root node until we actually * We don't know the level of the root node until we actually
* have it read locked * have it read locked
*/ */
b = __btrfs_read_lock_root_node(root, p->recurse); b = __btrfs_read_lock_root_node(root, 0);
level = btrfs_header_level(b); level = btrfs_header_level(b);
if (level > write_lock_level) if (level > write_lock_level)
goto out; goto out;
...@@ -2802,8 +2802,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root, ...@@ -2802,8 +2802,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root,
btrfs_tree_lock(b); btrfs_tree_lock(b);
p->locks[level] = BTRFS_WRITE_LOCK; p->locks[level] = BTRFS_WRITE_LOCK;
} else { } else {
__btrfs_tree_read_lock(b, BTRFS_NESTING_NORMAL, __btrfs_tree_read_lock(b, BTRFS_NESTING_NORMAL, 0);
p->recurse);
p->locks[level] = BTRFS_READ_LOCK; p->locks[level] = BTRFS_READ_LOCK;
} }
p->nodes[level] = b; p->nodes[level] = b;
......
...@@ -374,7 +374,6 @@ struct btrfs_path { ...@@ -374,7 +374,6 @@ struct btrfs_path {
unsigned int search_commit_root:1; unsigned int search_commit_root:1;
unsigned int need_commit_sem:1; unsigned int need_commit_sem:1;
unsigned int skip_release_on_error:1; unsigned int skip_release_on_error:1;
unsigned int recurse:1;
}; };
#define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \ #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \
sizeof(struct btrfs_item)) sizeof(struct btrfs_item))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment