diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 2972aaa9eb7e..4ff0cc1efb13 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1700,7 +1700,7 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen) | |||
1700 | leaf = btrfs_buffer_leaf(subvol); | 1700 | leaf = btrfs_buffer_leaf(subvol); |
1701 | btrfs_set_header_nritems(&leaf->header, 0); | 1701 | btrfs_set_header_nritems(&leaf->header, 0); |
1702 | btrfs_set_header_level(&leaf->header, 0); | 1702 | btrfs_set_header_level(&leaf->header, 0); |
1703 | btrfs_set_header_blocknr(&leaf->header, subvol->b_blocknr); | 1703 | btrfs_set_header_blocknr(&leaf->header, bh_blocknr(subvol)); |
1704 | btrfs_set_header_generation(&leaf->header, trans->transid); | 1704 | btrfs_set_header_generation(&leaf->header, trans->transid); |
1705 | memcpy(leaf->header.fsid, root->fs_info->disk_super->fsid, | 1705 | memcpy(leaf->header.fsid, root->fs_info->disk_super->fsid, |
1706 | sizeof(leaf->header.fsid)); | 1706 | sizeof(leaf->header.fsid)); |
@@ -1713,7 +1713,7 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen) | |||
1713 | btrfs_set_inode_nblocks(inode_item, 1); | 1713 | btrfs_set_inode_nblocks(inode_item, 1); |
1714 | btrfs_set_inode_mode(inode_item, S_IFDIR | 0755); | 1714 | btrfs_set_inode_mode(inode_item, S_IFDIR | 0755); |
1715 | 1715 | ||
1716 | btrfs_set_root_blocknr(&root_item, subvol->b_blocknr); | 1716 | btrfs_set_root_blocknr(&root_item, bh_blocknr(subvol)); |
1717 | btrfs_set_root_refs(&root_item, 1); | 1717 | btrfs_set_root_refs(&root_item, 1); |
1718 | 1718 | ||
1719 | mark_buffer_dirty(subvol); | 1719 | mark_buffer_dirty(subvol); |
@@ -1803,7 +1803,7 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen) | |||
1803 | key.offset = 1; | 1803 | key.offset = 1; |
1804 | key.flags = 0; | 1804 | key.flags = 0; |
1805 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); | 1805 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); |
1806 | btrfs_set_root_blocknr(&new_root_item, root->node->b_blocknr); | 1806 | btrfs_set_root_blocknr(&new_root_item, bh_blocknr(root->node)); |
1807 | 1807 | ||
1808 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, | 1808 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, |
1809 | &new_root_item); | 1809 | &new_root_item); |