summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>2015-10-27 20:38:55 +0100
committerMike Snitzer <snitzer@redhat.com>2015-11-01 00:06:04 +0100
commit340c9ec09b21c29e1e53284acc8993ddf6fc5b2a (patch)
treeee9f6d3446087a5b9e5489e522f5b7a2ccc4976e /drivers/md
parentdm linear: remove redundant target name from error messages (diff)
downloadlinux-340c9ec09b21c29e1e53284acc8993ddf6fc5b2a.tar.xz
linux-340c9ec09b21c29e1e53284acc8993ddf6fc5b2a.zip
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: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Acked-By: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-delay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c
index b34f6e27293d..e10f69a22c46 100644
--- a/drivers/md/dm-delay.c
+++ b/drivers/md/dm-delay.c
@@ -237,7 +237,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
unsigned long expires = 0;
if (!delay || !atomic_read(&dc->may_delay))
- return 1;
+ return DM_MAPIO_REMAPPED;
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)
queue_timeout(dc, expires);
- return 0;
+ return DM_MAPIO_SUBMITTED;
}
static void delay_presuspend(struct dm_target *ti)