eb = fs_info->chunk_root->node;
read_extent_buffer(eb, fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(eb),
- BTRFS_UUID_SIZE);
+ btrfs_header_chunk_tree_uuid(eb), BTRFS_UUID_SIZE);
return fs_info->chunk_root;
out_chunk:
btrfs_header_fsid(), BTRFS_FSID_SIZE);
write_extent_buffer(cow, root->fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(cow),
+ btrfs_header_chunk_tree_uuid(cow),
BTRFS_UUID_SIZE);
root->node = cow;
eb = fs_info->tree_root->node;
read_extent_buffer(eb, fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(eb),
+ btrfs_header_chunk_tree_uuid(eb),
BTRFS_UUID_SIZE);
return fs_info->fs_root;
btrfs_header_fsid(), BTRFS_FSID_SIZE);
write_extent_buffer(c, root->fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(c),
+ btrfs_header_chunk_tree_uuid(c),
BTRFS_UUID_SIZE);
btrfs_mark_buffer_dirty(c);
btrfs_header_fsid(), BTRFS_FSID_SIZE);
write_extent_buffer(c, root->fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(c),
+ btrfs_header_chunk_tree_uuid(c),
BTRFS_UUID_SIZE);
btrfs_set_node_key(c, &lower_key, 0);
write_extent_buffer(split, root->fs_info->fsid,
btrfs_header_fsid(), BTRFS_FSID_SIZE);
write_extent_buffer(split, root->fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(split),
+ btrfs_header_chunk_tree_uuid(split),
BTRFS_UUID_SIZE);
btrfs_header_fsid(), BTRFS_FSID_SIZE);
write_extent_buffer(right, root->fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(right),
+ btrfs_header_chunk_tree_uuid(right),
BTRFS_UUID_SIZE);
if (split == 0) {
return offsetof(struct btrfs_header, fsid);
}
-static inline u8 *btrfs_header_chunk_tree_uuid(struct extent_buffer *eb)
+static inline unsigned long btrfs_header_chunk_tree_uuid(struct extent_buffer *eb)
{
- unsigned long ptr = offsetof(struct btrfs_header, chunk_tree_uuid);
- return (u8 *)ptr;
+ return offsetof(struct btrfs_header, chunk_tree_uuid);
}
static inline u8 *btrfs_super_fsid(struct extent_buffer *eb)
eb = fs_info->chunk_root->node;
read_extent_buffer(eb, fs_info->chunk_tree_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(eb),
+ btrfs_header_chunk_tree_uuid(eb),
BTRFS_UUID_SIZE);
ret = btrfs_setup_all_roots(fs_info, root_tree_bytenr, flags);
uuid_unparse(disk_uuid, fs_uuid);
read_extent_buffer(eb, disk_uuid,
- (unsigned long)btrfs_header_chunk_tree_uuid(eb),
+ btrfs_header_chunk_tree_uuid(eb),
BTRFS_UUID_SIZE);
chunk_uuid[BTRFS_UUID_UNPARSED_SIZE - 1] = '\0';
write_extent_buffer(buf, super.fsid, btrfs_header_fsid(),
BTRFS_FSID_SIZE);
- write_extent_buffer(buf, chunk_tree_uuid, (unsigned long)
+ write_extent_buffer(buf, chunk_tree_uuid,
btrfs_header_chunk_tree_uuid(buf),
BTRFS_UUID_SIZE);