diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index ab4ac0365c7f..245eb00435dd 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -165,7 +165,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, | |||
165 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); | 165 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); |
166 | 166 | ||
167 | WARN_ON(btrfs_header_generation(buf) > trans->transid); | 167 | WARN_ON(btrfs_header_generation(buf) > trans->transid); |
168 | ret = btrfs_inc_ref(trans, new_root, buf); | 168 | ret = btrfs_inc_ref(trans, new_root, buf, 0); |
169 | kfree(new_root); | 169 | kfree(new_root); |
170 | 170 | ||
171 | if (ret) | 171 | if (ret) |
@@ -232,7 +232,7 @@ int __btrfs_cow_block(struct btrfs_trans_handle *trans, | |||
232 | WARN_ON(btrfs_header_generation(buf) > trans->transid); | 232 | WARN_ON(btrfs_header_generation(buf) > trans->transid); |
233 | if (btrfs_header_generation(buf) != trans->transid) { | 233 | if (btrfs_header_generation(buf) != trans->transid) { |
234 | different_trans = 1; | 234 | different_trans = 1; |
235 | ret = btrfs_inc_ref(trans, root, buf); | 235 | ret = btrfs_inc_ref(trans, root, buf, 1); |
236 | if (ret) | 236 | if (ret) |
237 | return ret; | 237 | return ret; |
238 | } else { | 238 | } else { |