aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <[email protected]>2013-11-26 15:01:34 +0000
committerChris Mason <[email protected]>2014-01-28 13:19:48 -0800
commitc42ac0bc9530d51029b938e09b60b5ee86e5ee70 (patch)
tree8ac0854125becbd20c2d9973e7e3bacea4714c10
parent32193c147f451652c6c089b5fa1c9852d53d65ee (diff)
Btrfs: add missing extent state caching calls
When we didn't find a matching extent state, we inserted a new one but didn't cache it in the **cached_state parameter, which makes a subsequent call do a tree lookup to get it. Signed-off-by: Filipe David Borba Manana <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
-rw-r--r--fs/btrfs/extent_io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3721820687d7..01a141245862 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -817,6 +817,7 @@ again:
if (err)
extent_io_tree_panic(tree, err);
+ cache_state(prealloc, cached_state);
prealloc = NULL;
goto out;
}
@@ -1040,9 +1041,10 @@ again:
goto out;
}
err = insert_state(tree, prealloc, start, end, &bits);
- prealloc = NULL;
if (err)
extent_io_tree_panic(tree, err);
+ cache_state(prealloc, cached_state);
+ prealloc = NULL;
goto out;
}
state = rb_entry(node, struct extent_state, rb_node);