summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2015-06-03 16:55:48 +0200
committerDavid Sterba <dsterba@suse.com>2016-01-15 19:22:28 +0100
commit95617d69326ce386c95e33db7aeb832b45ee9f8f (patch)
tree58b636c69bee4179da9b70fe66d448cf3605c1f0 /fs/btrfs/dev-replace.c
parentbtrfs: use list_for_each_entry* in backref.c (diff)
downloadlinux-95617d69326ce386c95e33db7aeb832b45ee9f8f.tar.xz
linux-95617d69326ce386c95e33db7aeb832b45ee9f8f.zip
btrfs: cleanup, stop casting for extent_map->lookup everywhere
Overloading extent_map->bdev to struct map_lookup * might have started out as a means to an end, but it's a pattern that's used all over the place now. Let's get rid of the casting and just add a union instead. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 1e668fb7dd4c..cbb7dbfb3fff 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -614,7 +614,7 @@ static void btrfs_dev_replace_update_device_in_mapping_tree(
em = lookup_extent_mapping(em_tree, start, (u64)-1);
if (!em)
break;
- map = (struct map_lookup *)em->bdev;
+ map = em->map_lookup;
for (i = 0; i < map->num_stripes; i++)
if (srcdev == map->stripes[i].dev)
map->stripes[i].dev = tgtdev;