diff options
author | David Sterba <dsterba@suse.com> | 2016-11-09 11:44:25 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-30 07:45:17 -0500 |
commit | d24ee97b96db46123f766041d2ec0ca81491bd31 (patch) | |
tree | 269f11139b8649558f76a3e598fc8cb861cbf3e9 /fs/btrfs/disk-io.c | |
parent | f157bf765b3773efb5e981dea286cd311fca3b59 (diff) |
btrfs: use new helpers to set uuids in eb
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 686d05acfdb7..21f8e597fe97 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1419,11 +1419,8 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans, | |||
1419 | btrfs_set_header_owner(leaf, objectid); | 1419 | btrfs_set_header_owner(leaf, objectid); |
1420 | root->node = leaf; | 1420 | root->node = leaf; |
1421 | 1421 | ||
1422 | write_extent_buffer(leaf, fs_info->fsid, btrfs_header_fsid(), | 1422 | write_extent_buffer_fsid(leaf, fs_info->fsid); |
1423 | BTRFS_FSID_SIZE); | 1423 | write_extent_buffer_chunk_tree_uuid(leaf, fs_info->chunk_tree_uuid); |
1424 | write_extent_buffer(leaf, fs_info->chunk_tree_uuid, | ||
1425 | btrfs_header_chunk_tree_uuid(leaf), | ||
1426 | BTRFS_UUID_SIZE); | ||
1427 | btrfs_mark_buffer_dirty(leaf); | 1424 | btrfs_mark_buffer_dirty(leaf); |
1428 | 1425 | ||
1429 | root->commit_root = btrfs_root_node(root); | 1426 | root->commit_root = btrfs_root_node(root); |
@@ -1506,8 +1503,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, | |||
1506 | btrfs_set_header_owner(leaf, BTRFS_TREE_LOG_OBJECTID); | 1503 | btrfs_set_header_owner(leaf, BTRFS_TREE_LOG_OBJECTID); |
1507 | root->node = leaf; | 1504 | root->node = leaf; |
1508 | 1505 | ||
1509 | write_extent_buffer(root->node, root->fs_info->fsid, | 1506 | write_extent_buffer_fsid(root->node, root->fs_info->fsid); |
1510 | btrfs_header_fsid(), BTRFS_FSID_SIZE); | ||
1511 | btrfs_mark_buffer_dirty(root->node); | 1507 | btrfs_mark_buffer_dirty(root->node); |
1512 | btrfs_tree_unlock(root->node); | 1508 | btrfs_tree_unlock(root->node); |
1513 | return root; | 1509 | return root; |