diff options
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 6ac1b7f72e2a..33eee256ee81 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -374,13 +374,8 @@ insert: | |||
374 | if (found_size > item_size) { | 374 | if (found_size > item_size) { |
375 | btrfs_truncate_item(trans, root, path, item_size, 1); | 375 | btrfs_truncate_item(trans, root, path, item_size, 1); |
376 | } else if (found_size < item_size) { | 376 | } else if (found_size < item_size) { |
377 | ret = btrfs_del_item(trans, root, | 377 | ret = btrfs_extend_item(trans, root, path, |
378 | path); | 378 | item_size - found_size); |
379 | BUG_ON(ret); | ||
380 | |||
381 | btrfs_release_path(root, path); | ||
382 | ret = btrfs_insert_empty_item(trans, | ||
383 | root, path, key, item_size); | ||
384 | BUG_ON(ret); | 379 | BUG_ON(ret); |
385 | } | 380 | } |
386 | } else if (ret) { | 381 | } else if (ret) { |