mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
a7ca42256d
commit
95617d6932
6 changed files with 25 additions and 17 deletions
|
@ -32,7 +32,15 @@ struct extent_map {
|
|||
u64 block_len;
|
||||
u64 generation;
|
||||
unsigned long flags;
|
||||
struct block_device *bdev;
|
||||
union {
|
||||
struct block_device *bdev;
|
||||
|
||||
/*
|
||||
* used for chunk mappings
|
||||
* flags & EXTENT_FLAG_FS_MAPPING must be set
|
||||
*/
|
||||
struct map_lookup *map_lookup;
|
||||
};
|
||||
atomic_t refs;
|
||||
unsigned int compress_type;
|
||||
struct list_head list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue