summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-07-01 23:30:36 +0200
committerMike Snitzer <snitzer@redhat.com>2015-08-12 17:32:20 +0200
commitab37844d6169c2dd6f96e665b07b692ba1a4c180 (patch)
treec66fb0d74d2bd9237a265a011d4ab738b9023f8e /drivers/md/dm.c
parentdm verity: remove unused mempool (diff)
downloadlinux-ab37844d6169c2dd6f96e665b07b692ba1a4c180.tar.xz
linux-ab37844d6169c2dd6f96e665b07b692ba1a4c180.zip
dm: test return value for DM_MAPIO_SUBMITTED
In properly written code we should not assume that DM_MAPIO_SUBMITTED is zero. We should test the return value for DM_MAPIO_SUBMITTED rather than testing it for zero. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 0d7ab20c58df..0907d9eb864e 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1466,7 +1466,7 @@ static void __map_bio(struct dm_target_io *tio)
md = tio->io->md;
dec_pending(tio->io, r);
free_tio(md, tio);
- } else if (r) {
+ } else if (r != DM_MAPIO_SUBMITTED) {
DMWARN("unimplemented target map return value: %d", r);
BUG();
}