diff options
author | Byongho Lee <bhlee.kernel@gmail.com> | 2016-01-04 10:01:33 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-12 15:01:05 +0100 |
commit | 97f72e7507f79dfdb70d20e839f7d8e2070dcb9d (patch) | |
tree | 031cac430284c5f7eb02cce62dda896c7f6839d2 /btrfs-image.c | |
parent | e55eb2e51a8d2396dcf4a809efb50567a7bf5aa4 (diff) |
btrfs-progs: fix endian bug in update_super()
In update_super() 'chunk->stripe.devid' and 'super->dev_item.devid' both
are little endian. So we should not use endian helper
btrfs_set_stack_stripe_devid().
Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r-- | btrfs-image.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/btrfs-image.c b/btrfs-image.c index 4a0a7c54..bb1f6351 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -1464,8 +1464,7 @@ static int update_super(struct mdrestore_struct *mdres, u8 *buffer) btrfs_set_stack_chunk_sub_stripes(chunk, 0); btrfs_set_stack_chunk_type(chunk, BTRFS_BLOCK_GROUP_SYSTEM); - btrfs_set_stack_stripe_devid(&chunk->stripe, - super->dev_item.devid); + chunk->stripe.devid = super->dev_item.devid; physical = logical_to_physical(mdres, key.offset, &size); if (size != (u64)-1) |