diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-08-20 07:20:14 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:16:15 -0400 |
commit | fba6aa75654394fccf2530041e9451414c28084f (patch) | |
tree | b204c6ad9f1c7c0a3dcab4508081acd5afd57963 /fs/btrfs/ctree.c | |
parent | 231e88f41027d90e9516d257d8085069b65686dd (diff) |
Btrfs: Make btrfs_header_fsid() return unsigned long
Internally, btrfs_header_fsid() calculates an unsigned long, but casts
it to a pointer, while all callers cast it to unsigned long again.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 1d94242ec002..8e3efe3bad24 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -274,8 +274,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, | |||
274 | else | 274 | else |
275 | btrfs_set_header_owner(cow, new_root_objectid); | 275 | btrfs_set_header_owner(cow, new_root_objectid); |
276 | 276 | ||
277 | write_extent_buffer(cow, root->fs_info->fsid, | 277 | write_extent_buffer(cow, root->fs_info->fsid, btrfs_header_fsid(cow), |
278 | (unsigned long)btrfs_header_fsid(cow), | ||
279 | BTRFS_FSID_SIZE); | 278 | BTRFS_FSID_SIZE); |
280 | 279 | ||
281 | WARN_ON(btrfs_header_generation(buf) > trans->transid); | 280 | WARN_ON(btrfs_header_generation(buf) > trans->transid); |
@@ -997,8 +996,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, | |||
997 | else | 996 | else |
998 | btrfs_set_header_owner(cow, root->root_key.objectid); | 997 | btrfs_set_header_owner(cow, root->root_key.objectid); |
999 | 998 | ||
1000 | write_extent_buffer(cow, root->fs_info->fsid, | 999 | write_extent_buffer(cow, root->fs_info->fsid, btrfs_header_fsid(cow), |
1001 | (unsigned long)btrfs_header_fsid(cow), | ||
1002 | BTRFS_FSID_SIZE); | 1000 | BTRFS_FSID_SIZE); |
1003 | 1001 | ||
1004 | ret = update_ref_for_cow(trans, root, buf, cow, &last_ref); | 1002 | ret = update_ref_for_cow(trans, root, buf, cow, &last_ref); |
@@ -3109,8 +3107,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans, | |||
3109 | btrfs_set_header_backref_rev(c, BTRFS_MIXED_BACKREF_REV); | 3107 | btrfs_set_header_backref_rev(c, BTRFS_MIXED_BACKREF_REV); |
3110 | btrfs_set_header_owner(c, root->root_key.objectid); | 3108 | btrfs_set_header_owner(c, root->root_key.objectid); |
3111 | 3109 | ||
3112 | write_extent_buffer(c, root->fs_info->fsid, | 3110 | write_extent_buffer(c, root->fs_info->fsid, btrfs_header_fsid(c), |
3113 | (unsigned long)btrfs_header_fsid(c), | ||
3114 | BTRFS_FSID_SIZE); | 3111 | BTRFS_FSID_SIZE); |
3115 | 3112 | ||
3116 | write_extent_buffer(c, root->fs_info->chunk_tree_uuid, | 3113 | write_extent_buffer(c, root->fs_info->chunk_tree_uuid, |
@@ -3250,8 +3247,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans, | |||
3250 | btrfs_set_header_backref_rev(split, BTRFS_MIXED_BACKREF_REV); | 3247 | btrfs_set_header_backref_rev(split, BTRFS_MIXED_BACKREF_REV); |
3251 | btrfs_set_header_owner(split, root->root_key.objectid); | 3248 | btrfs_set_header_owner(split, root->root_key.objectid); |
3252 | write_extent_buffer(split, root->fs_info->fsid, | 3249 | write_extent_buffer(split, root->fs_info->fsid, |
3253 | (unsigned long)btrfs_header_fsid(split), | 3250 | btrfs_header_fsid(split), BTRFS_FSID_SIZE); |
3254 | BTRFS_FSID_SIZE); | ||
3255 | write_extent_buffer(split, root->fs_info->chunk_tree_uuid, | 3251 | write_extent_buffer(split, root->fs_info->chunk_tree_uuid, |
3256 | (unsigned long)btrfs_header_chunk_tree_uuid(split), | 3252 | (unsigned long)btrfs_header_chunk_tree_uuid(split), |
3257 | BTRFS_UUID_SIZE); | 3253 | BTRFS_UUID_SIZE); |
@@ -4006,8 +4002,7 @@ again: | |||
4006 | btrfs_set_header_owner(right, root->root_key.objectid); | 4002 | btrfs_set_header_owner(right, root->root_key.objectid); |
4007 | btrfs_set_header_level(right, 0); | 4003 | btrfs_set_header_level(right, 0); |
4008 | write_extent_buffer(right, root->fs_info->fsid, | 4004 | write_extent_buffer(right, root->fs_info->fsid, |
4009 | (unsigned long)btrfs_header_fsid(right), | 4005 | btrfs_header_fsid(right), BTRFS_FSID_SIZE); |
4010 | BTRFS_FSID_SIZE); | ||
4011 | 4006 | ||
4012 | write_extent_buffer(right, root->fs_info->chunk_tree_uuid, | 4007 | write_extent_buffer(right, root->fs_info->chunk_tree_uuid, |
4013 | (unsigned long)btrfs_header_chunk_tree_uuid(right), | 4008 | (unsigned long)btrfs_header_chunk_tree_uuid(right), |