diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 8bb452456d90..dd1c03aea2df 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -185,6 +185,10 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, | |||
185 | btrfs_set_header_owner(cow, new_root_objectid); | 185 | btrfs_set_header_owner(cow, new_root_objectid); |
186 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); | 186 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); |
187 | 187 | ||
188 | write_extent_buffer(cow, root->fs_info->fsid, | ||
189 | (unsigned long)btrfs_header_fsid(cow), | ||
190 | BTRFS_FSID_SIZE); | ||
191 | |||
188 | WARN_ON(btrfs_header_generation(buf) > trans->transid); | 192 | WARN_ON(btrfs_header_generation(buf) > trans->transid); |
189 | ret = btrfs_inc_ref(trans, new_root, buf, cow, NULL); | 193 | ret = btrfs_inc_ref(trans, new_root, buf, cow, NULL); |
190 | kfree(new_root); | 194 | kfree(new_root); |
@@ -274,6 +278,10 @@ int noinline __btrfs_cow_block(struct btrfs_trans_handle *trans, | |||
274 | btrfs_set_header_owner(cow, root->root_key.objectid); | 278 | btrfs_set_header_owner(cow, root->root_key.objectid); |
275 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); | 279 | btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN); |
276 | 280 | ||
281 | write_extent_buffer(cow, root->fs_info->fsid, | ||
282 | (unsigned long)btrfs_header_fsid(cow), | ||
283 | BTRFS_FSID_SIZE); | ||
284 | |||
277 | WARN_ON(btrfs_header_generation(buf) > trans->transid); | 285 | WARN_ON(btrfs_header_generation(buf) > trans->transid); |
278 | if (btrfs_header_generation(buf) != trans->transid) { | 286 | if (btrfs_header_generation(buf) != trans->transid) { |
279 | u32 nr_extents; | 287 | u32 nr_extents; |