Commit 0ef8b242 authored by Chris Mason's avatar Chris Mason

Btrfs: Properly dirty buffers in the split corner cases

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 0999df54
...@@ -2052,6 +2052,7 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root ...@@ -2052,6 +2052,7 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
path->nodes[0] = right; path->nodes[0] = right;
path->slots[0] = 0; path->slots[0] = 0;
path->slots[1] += 1; path->slots[1] += 1;
btrfs_mark_buffer_dirty(right);
return ret; return ret;
} }
mid = slot; mid = slot;
...@@ -2082,6 +2083,7 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root ...@@ -2082,6 +2083,7 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
if (wret) if (wret)
ret = wret; ret = wret;
} }
btrfs_mark_buffer_dirty(right);
return ret; return ret;
} else if (extend && slot == 0) { } else if (extend && slot == 0) {
mid = 1; mid = 1;
......
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