Commit 340c9ec0 authored by Tomohiro Kusumi's avatar Tomohiro Kusumi Committed by Mike Snitzer

dm delay: Use DM_MAPIO macros instead of open-coded equivalents

.map function of dm-delay returns return value of delay_bio(),
hence it's supposed to return using a defined DM_MAPIO macro.
Signed-off-by: default avatarTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Acked-By: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 00272c85
...@@ -237,7 +237,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio) ...@@ -237,7 +237,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
unsigned long expires = 0; unsigned long expires = 0;
if (!delay || !atomic_read(&dc->may_delay)) if (!delay || !atomic_read(&dc->may_delay))
return 1; return DM_MAPIO_REMAPPED;
delayed = dm_per_bio_data(bio, sizeof(struct dm_delay_info)); delayed = dm_per_bio_data(bio, sizeof(struct dm_delay_info));
...@@ -257,7 +257,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio) ...@@ -257,7 +257,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
queue_timeout(dc, expires); queue_timeout(dc, expires);
return 0; return DM_MAPIO_SUBMITTED;
} }
static void delay_presuspend(struct dm_target *ti) static void delay_presuspend(struct dm_target *ti)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment