diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-02-22 14:14:24 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-03-10 17:12:06 -0500 |
commit | 1d3aa6f683b1c1a813a63339d7309cff58ba4531 (patch) | |
tree | 045bee4053dffba13a094d7151430cb10b6036be /drivers/md | |
parent | 115485e83f497fdf9b4bf779038cfe4e141292a9 (diff) |
dm: remove dummy definition of 'struct dm_table'
Change the map pointer in 'struct mapped_device' from 'struct dm_table
__rcu *' to 'void __rcu *' to avoid the need for the dummy definition.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index cc9ab343730d..3cae8547420a 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -121,14 +121,6 @@ struct dm_rq_clone_bio_info { | |||
121 | #define DMF_SUSPENDED_INTERNALLY 7 | 121 | #define DMF_SUSPENDED_INTERNALLY 7 |
122 | 122 | ||
123 | /* | 123 | /* |
124 | * A dummy definition to make RCU happy. | ||
125 | * struct dm_table should never be dereferenced in this file. | ||
126 | */ | ||
127 | struct dm_table { | ||
128 | int undefined__; | ||
129 | }; | ||
130 | |||
131 | /* | ||
132 | * Work processed by per-device workqueue. | 124 | * Work processed by per-device workqueue. |
133 | */ | 125 | */ |
134 | struct mapped_device { | 126 | struct mapped_device { |
@@ -138,11 +130,11 @@ struct mapped_device { | |||
138 | atomic_t open_count; | 130 | atomic_t open_count; |
139 | 131 | ||
140 | /* | 132 | /* |
141 | * The current mapping. | 133 | * The current mapping (struct dm_table *). |
142 | * Use dm_get_live_table{_fast} or take suspend_lock for | 134 | * Use dm_get_live_table{_fast} or take suspend_lock for |
143 | * dereference. | 135 | * dereference. |
144 | */ | 136 | */ |
145 | struct dm_table __rcu *map; | 137 | void __rcu *map; |
146 | 138 | ||
147 | struct list_head table_devices; | 139 | struct list_head table_devices; |
148 | struct mutex table_devices_lock; | 140 | struct mutex table_devices_lock; |
@@ -2562,7 +2554,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t, | |||
2562 | __bind_mempools(md, t); | 2554 | __bind_mempools(md, t); |
2563 | 2555 | ||
2564 | old_map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); | 2556 | old_map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); |
2565 | rcu_assign_pointer(md->map, t); | 2557 | rcu_assign_pointer(md->map, (void *)t); |
2566 | md->immutable_target_type = dm_table_get_immutable_target_type(t); | 2558 | md->immutable_target_type = dm_table_get_immutable_target_type(t); |
2567 | 2559 | ||
2568 | dm_table_set_restrictions(t, q, limits); | 2560 | dm_table_set_restrictions(t, q, limits); |