Pārlūkot izejas kodu

btrfs_next_leaf: do readahead when skip_locking is turned on

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 gadi atpakaļ
vecāks
revīzija
0bd40a7184
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      fs/btrfs/ctree.c

+ 2 - 1
fs/btrfs/ctree.c

@@ -3206,7 +3206,8 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
 			free_extent_buffer(next);
 			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);
 			reada_for_search(root, path, level, slot, 0);
 
 
 		next = read_node_slot(root, c, slot);
 		next = read_node_slot(root, c, slot);