diff options
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index d754e0bc6e90..e77ee6fd1044 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -104,8 +104,8 @@ typedef int (*action_fn) (struct pgpath *pgpath); | |||
104 | static kmem_cache_t *_mpio_cache; | 104 | static kmem_cache_t *_mpio_cache; |
105 | 105 | ||
106 | struct workqueue_struct *kmultipathd; | 106 | struct workqueue_struct *kmultipathd; |
107 | static void process_queued_ios(void *data); | 107 | static void process_queued_ios(struct work_struct *work); |
108 | static void trigger_event(void *data); | 108 | static void trigger_event(struct work_struct *work); |
109 | 109 | ||
110 | 110 | ||
111 | /*----------------------------------------------- | 111 | /*----------------------------------------------- |
@@ -173,8 +173,8 @@ static struct multipath *alloc_multipath(struct dm_target *ti) | |||
173 | INIT_LIST_HEAD(&m->priority_groups); | 173 | INIT_LIST_HEAD(&m->priority_groups); |
174 | spin_lock_init(&m->lock); | 174 | spin_lock_init(&m->lock); |
175 | m->queue_io = 1; | 175 | m->queue_io = 1; |
176 | INIT_WORK(&m->process_queued_ios, process_queued_ios, m); | 176 | INIT_WORK(&m->process_queued_ios, process_queued_ios); |
177 | INIT_WORK(&m->trigger_event, trigger_event, m); | 177 | INIT_WORK(&m->trigger_event, trigger_event); |
178 | m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache); | 178 | m->mpio_pool = mempool_create_slab_pool(MIN_IOS, _mpio_cache); |
179 | if (!m->mpio_pool) { | 179 | if (!m->mpio_pool) { |
180 | kfree(m); | 180 | kfree(m); |
@@ -379,9 +379,10 @@ static void dispatch_queued_ios(struct multipath *m) | |||
379 | } | 379 | } |
380 | } | 380 | } |
381 | 381 | ||
382 | static void process_queued_ios(void *data) | 382 | static void process_queued_ios(struct work_struct *work) |
383 | { | 383 | { |
384 | struct multipath *m = (struct multipath *) data; | 384 | struct multipath *m = |
385 | container_of(work, struct multipath, process_queued_ios); | ||
385 | struct hw_handler *hwh = &m->hw_handler; | 386 | struct hw_handler *hwh = &m->hw_handler; |
386 | struct pgpath *pgpath = NULL; | 387 | struct pgpath *pgpath = NULL; |
387 | unsigned init_required = 0, must_queue = 1; | 388 | unsigned init_required = 0, must_queue = 1; |
@@ -421,9 +422,10 @@ out: | |||
421 | * An event is triggered whenever a path is taken out of use. | 422 | * An event is triggered whenever a path is taken out of use. |
422 | * Includes path failure and PG bypass. | 423 | * Includes path failure and PG bypass. |
423 | */ | 424 | */ |
424 | static void trigger_event(void *data) | 425 | static void trigger_event(struct work_struct *work) |
425 | { | 426 | { |
426 | struct multipath *m = (struct multipath *) data; | 427 | struct multipath *m = |
428 | container_of(work, struct multipath, trigger_event); | ||
427 | 429 | ||
428 | dm_table_event(m->ti->table); | 430 | dm_table_event(m->ti->table); |
429 | } | 431 | } |