Commit ae9d1285 authored by Chris Mason's avatar Chris Mason

Btrfs: Fix delalloc account on state deletion

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 2f375ab9
...@@ -396,6 +396,7 @@ static int clear_state_bit(struct extent_io_tree *tree, ...@@ -396,6 +396,7 @@ static int clear_state_bit(struct extent_io_tree *tree,
wake_up(&state->wq); wake_up(&state->wq);
if (delete || state->state == 0) { if (delete || state->state == 0) {
if (state->tree) { if (state->tree) {
clear_state_cb(tree, state, state->state);
if (tree->last == state) if (tree->last == state)
tree->last = NULL; tree->last = NULL;
rb_erase(&state->rb_node, &tree->state); rb_erase(&state->rb_node, &tree->state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment