diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-06-27 16:55:16 +0100 |
---|---|---|
committer | Harrier <harrier7@codethink.co.uk> | 2013-05-16 11:33:05 +0000 |
commit | 8be85e022695b52b0e9409317a13e53122cac406 (patch) | |
tree | 28590808ec66e833fd4de422dfeed32157522b32 | |
parent | 40e9884573bd4636c92aeddcee823a05f72d654b (diff) | |
download | btrfs-progs-8be85e022695b52b0e9409317a13e53122cac406.tar.gz |
Patch from Csaba Tóth of Watt 22 Ltd. which attempts to fix operation on ARM
-rw-r--r-- | ctree.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -738,14 +738,14 @@ static int generic_bin_search(struct extent_buffer *eb, unsigned long p, int mid; int ret; unsigned long offset; - struct btrfs_disk_key *tmp; + struct btrfs_disk_key tmp; while(low < high) { mid = (low + high) / 2; offset = p + mid * item_size; - tmp = (struct btrfs_disk_key *)(eb->data + offset); - ret = btrfs_comp_keys(tmp, key); + memcpy(&tmp, eb->data + offset, sizeof(struct btrfs_disk_key)); + ret = btrfs_comp_keys(&tmp, key); if (ret < 0) low = mid + 1; |