diff options
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c51cd11de206..72fa28236e5d 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -937,6 +937,7 @@ int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, | |||
937 | level = btrfs_header_level(buf); | 937 | level = btrfs_header_level(buf); |
938 | nritems = btrfs_header_nritems(buf); | 938 | nritems = btrfs_header_nritems(buf); |
939 | for (i = 0; i < nritems; i++) { | 939 | for (i = 0; i < nritems; i++) { |
940 | cond_resched(); | ||
940 | if (level == 0) { | 941 | if (level == 0) { |
941 | u64 disk_bytenr; | 942 | u64 disk_bytenr; |
942 | btrfs_item_key_to_cpu(buf, &key, i); | 943 | btrfs_item_key_to_cpu(buf, &key, i); |
@@ -2189,6 +2190,7 @@ static int noinline drop_leaf_ref(struct btrfs_trans_handle *trans, | |||
2189 | 2190 | ||
2190 | for (i = 0; i < nritems; i++) { | 2191 | for (i = 0; i < nritems; i++) { |
2191 | u64 disk_bytenr; | 2192 | u64 disk_bytenr; |
2193 | cond_resched(); | ||
2192 | 2194 | ||
2193 | btrfs_item_key_to_cpu(leaf, &key, i); | 2195 | btrfs_item_key_to_cpu(leaf, &key, i); |
2194 | if (btrfs_key_type(&key) != BTRFS_EXTENT_DATA_KEY) | 2196 | if (btrfs_key_type(&key) != BTRFS_EXTENT_DATA_KEY) |