summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2016-02-22 14:14:24 -0500
committerMike Snitzer <snitzer@redhat.com>2016-03-10 17:12:06 -0500
commit1d3aa6f683b1c1a813a63339d7309cff58ba4531 (patch)
tree045bee4053dffba13a094d7151430cb10b6036be /drivers/md
parent115485e83f497fdf9b4bf779038cfe4e141292a9 (diff)
downloadlinux-1d3aa6f683b1c1a813a63339d7309cff58ba4531.tar.bz2
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.c14
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 {
#define DMF_SUSPENDED_INTERNALLY 7
/*
- * A dummy definition to make RCU happy.
- * struct dm_table should never be dereferenced in this file.
- */
-struct dm_table {
- int undefined__;
-};
-
-/*
* Work processed by per-device workqueue.
*/
struct mapped_device {
@@ -138,11 +130,11 @@ struct mapped_device {
atomic_t open_count;
/*
- * The current mapping.
+ * The current mapping (struct dm_table *).
* Use dm_get_live_table{_fast} or take suspend_lock for
* dereference.
*/
- struct dm_table __rcu *map;
+ void __rcu *map;
struct list_head table_devices;
struct mutex table_devices_lock;
@@ -2562,7 +2554,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
__bind_mempools(md, t);
old_map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
- rcu_assign_pointer(md->map, t);
+ rcu_assign_pointer(md->map, (void *)t);
md->immutable_target_type = dm_table_get_immutable_target_type(t);
dm_table_set_restrictions(t, q, limits);