diff options
author | Chris Mason <clm@fb.com> | 2016-01-11 14:59:32 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-01-11 14:59:32 +0100 |
commit | a3058101c17d2825f34a0ab5c37d93ead0f4d9dc (patch) | |
tree | 193417b02c4fa79b582b435e154761b91a501884 /fs/btrfs/ctree.c | |
parent | btrfs: don't run delayed references while we are creating the free space tree (diff) | |
parent | Btrfs: Check metadata redundancy on balance (diff) | |
download | linux-a3058101c17d2825f34a0ab5c37d93ead0f4d9dc.tar.xz linux-a3058101c17d2825f34a0ab5c37d93ead0f4d9dc.zip |
Merge branch 'misc-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.5
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 5b8e235c4b6d..be1be0422ff4 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2248,7 +2248,6 @@ static void reada_for_search(struct btrfs_root *root, u64 target; u64 nread = 0; u64 gen; - int direction = path->reada; struct extent_buffer *eb; u32 nr; u32 blocksize; @@ -2276,16 +2275,16 @@ static void reada_for_search(struct btrfs_root *root, nr = slot; while (1) { - if (direction < 0) { + if (path->reada == READA_BACK) { if (nr == 0) break; nr--; - } else if (direction > 0) { + } else if (path->reada == READA_FORWARD) { nr++; if (nr >= nritems) break; } - if (path->reada < 0 && objectid) { + if (path->reada == READA_BACK && objectid) { btrfs_node_key(node, &disk_key, nr); if (btrfs_disk_key_objectid(&disk_key) != objectid) break; @@ -2493,7 +2492,7 @@ read_block_for_search(struct btrfs_trans_handle *trans, btrfs_set_path_blocking(p); free_extent_buffer(tmp); - if (p->reada) + if (p->reada != READA_NONE) reada_for_search(root, p, level, slot, key->objectid); btrfs_release_path(p); |