aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-delay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-delay.c')
-rw-r--r--drivers/md/dm-delay.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index 52c7cf9e5803..eb218266cbf3 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -37,7 +37,7 @@ struct delay_c {
37 unsigned writes; 37 unsigned writes;
38}; 38};
39 39
40struct delay_info { 40struct dm_delay_info {
41 struct delay_c *context; 41 struct delay_c *context;
42 struct list_head list; 42 struct list_head list;
43 struct bio *bio; 43 struct bio *bio;
@@ -80,7 +80,7 @@ static void flush_bios(struct bio *bio)
80 80
81static struct bio *flush_delayed_bios(struct delay_c *dc, int flush_all) 81static struct bio *flush_delayed_bios(struct delay_c *dc, int flush_all)
82{ 82{
83 struct delay_info *delayed, *next; 83 struct dm_delay_info *delayed, *next;
84 unsigned long next_expires = 0; 84 unsigned long next_expires = 0;
85 int start_timer = 0; 85 int start_timer = 0;
86 BIO_LIST(flush_bios); 86 BIO_LIST(flush_bios);
@@ -227,7 +227,7 @@ static void delay_dtr(struct dm_target *ti)
227 227
228static int delay_bio(struct delay_c *dc, int delay, struct bio *bio) 228static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
229{ 229{
230 struct delay_info *delayed; 230 struct dm_delay_info *delayed;
231 unsigned long expires = 0; 231 unsigned long expires = 0;
232 232
233 if (!delay || !atomic_read(&dc->may_delay)) 233 if (!delay || !atomic_read(&dc->may_delay))
@@ -338,10 +338,7 @@ static int __init dm_delay_init(void)
338 goto bad_queue; 338 goto bad_queue;
339 } 339 }
340 340
341 delayed_cache = kmem_cache_create("dm-delay", 341 delayed_cache = KMEM_CACHE(dm_delay_info, 0);
342 sizeof(struct delay_info),
343 __alignof__(struct delay_info),
344 0, NULL, NULL);
345 if (!delayed_cache) { 342 if (!delayed_cache) {
346 DMERR("Couldn't create delayed bio cache."); 343 DMERR("Couldn't create delayed bio cache.");
347 goto bad_memcache; 344 goto bad_memcache;