diff options
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r-- | drivers/md/dm-snap.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 5281e0094072..b0ce2ce82278 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #define SNAPSHOT_PAGES 256 | 40 | #define SNAPSHOT_PAGES 256 |
41 | 41 | ||
42 | struct workqueue_struct *ksnapd; | 42 | struct workqueue_struct *ksnapd; |
43 | static void flush_queued_bios(void *data); | 43 | static void flush_queued_bios(struct work_struct *work); |
44 | 44 | ||
45 | struct pending_exception { | 45 | struct pending_exception { |
46 | struct exception e; | 46 | struct exception e; |
@@ -88,8 +88,8 @@ struct pending_exception { | |||
88 | * Hash table mapping origin volumes to lists of snapshots and | 88 | * Hash table mapping origin volumes to lists of snapshots and |
89 | * a lock to protect it | 89 | * a lock to protect it |
90 | */ | 90 | */ |
91 | static kmem_cache_t *exception_cache; | 91 | static struct kmem_cache *exception_cache; |
92 | static kmem_cache_t *pending_cache; | 92 | static struct kmem_cache *pending_cache; |
93 | static mempool_t *pending_pool; | 93 | static mempool_t *pending_pool; |
94 | 94 | ||
95 | /* | 95 | /* |
@@ -228,7 +228,7 @@ static int init_exception_table(struct exception_table *et, uint32_t size) | |||
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
230 | 230 | ||
231 | static void exit_exception_table(struct exception_table *et, kmem_cache_t *mem) | 231 | static void exit_exception_table(struct exception_table *et, struct kmem_cache *mem) |
232 | { | 232 | { |
233 | struct list_head *slot; | 233 | struct list_head *slot; |
234 | struct exception *ex, *next; | 234 | struct exception *ex, *next; |
@@ -528,7 +528,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
528 | } | 528 | } |
529 | 529 | ||
530 | bio_list_init(&s->queued_bios); | 530 | bio_list_init(&s->queued_bios); |
531 | INIT_WORK(&s->queued_bios_work, flush_queued_bios, s); | 531 | INIT_WORK(&s->queued_bios_work, flush_queued_bios); |
532 | 532 | ||
533 | /* Add snapshot to the list of snapshots for this origin */ | 533 | /* Add snapshot to the list of snapshots for this origin */ |
534 | /* Exceptions aren't triggered till snapshot_resume() is called */ | 534 | /* Exceptions aren't triggered till snapshot_resume() is called */ |
@@ -603,9 +603,10 @@ static void flush_bios(struct bio *bio) | |||
603 | } | 603 | } |
604 | } | 604 | } |
605 | 605 | ||
606 | static void flush_queued_bios(void *data) | 606 | static void flush_queued_bios(struct work_struct *work) |
607 | { | 607 | { |
608 | struct dm_snapshot *s = (struct dm_snapshot *) data; | 608 | struct dm_snapshot *s = |
609 | container_of(work, struct dm_snapshot, queued_bios_work); | ||
609 | struct bio *queued_bios; | 610 | struct bio *queued_bios; |
610 | unsigned long flags; | 611 | unsigned long flags; |
611 | 612 | ||