diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-07-05 11:09:04 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-07-05 11:09:04 -0400 |
commit | e035bcdddbd9dbe890e048066df6cbdd7cc06815 (patch) | |
tree | 5a1a9a30532a0914cc362e0417cb9499dbff8a19 | |
parent | 4fbfcaa8beb901050612bc35a0c8bbc1f3b58188 (diff) |
btrfsck: fix incorrect casting on items in the corrupt_blocks tree
check_extent_refs is pinning down all the corrupt tree blocks it finds,
but it is incorrectly casting these to an extent_record first.
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r-- | cmds-check.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cmds-check.c b/cmds-check.c index 185d91fc..80152883 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -4806,9 +4806,8 @@ static int check_extent_refs(struct btrfs_trans_handle *trans, /* pin down all the corrupted blocks too */ cache = search_cache_extent(root->fs_info->corrupt_blocks, 0); while(cache) { - rec = container_of(cache, struct extent_record, cache); btrfs_pin_extent(root->fs_info, - rec->start, rec->max_size); + cache->start, cache->size); cache = next_cache_extent(cache); } prune_corrupt_blocks(trans, root->fs_info); |