aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 6ac1b7f..33eee25 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -374,13 +374,8 @@ insert:
if (found_size > item_size) {
btrfs_truncate_item(trans, root, path, item_size, 1);
} else if (found_size < item_size) {
- ret = btrfs_del_item(trans, root,
- path);
- BUG_ON(ret);
-
- btrfs_release_path(root, path);
- ret = btrfs_insert_empty_item(trans,
- root, path, key, item_size);
+ ret = btrfs_extend_item(trans, root, path,
+ item_size - found_size);
BUG_ON(ret);
}
} else if (ret) {