Skip to content

Commit

Permalink
btrfs_next_leaf: do readahead when skip_locking is turned on
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent ee6e650 commit 0bd40a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,8 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
free_extent_buffer(next);
}

if (level == 1 && path->locks[1] && path->reada)
if (level == 1 && (path->locks[1] || path->skip_locking) &&
path->reada)
reada_for_search(root, path, level, slot, 0);

next = read_node_slot(root, c, slot);
Expand Down

0 comments on commit 0bd40a7

Please sign in to comment.