Message ID | 1374015239-27549-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 7a11fb7..d24e546 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1049,7 +1049,8 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, btrfs_set_node_ptr_generation(parent, parent_slot, trans->transid); btrfs_mark_buffer_dirty(parent); - tree_mod_log_free_eb(root->fs_info, buf); + if (last_ref) + tree_mod_log_free_eb(root->fs_info, buf); btrfs_free_tree_block(trans, root, buf, parent_start, last_ref); }