Commit ab37844d authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer

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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 4fb9aa5a
...@@ -1466,7 +1466,7 @@ static void __map_bio(struct dm_target_io *tio) ...@@ -1466,7 +1466,7 @@ static void __map_bio(struct dm_target_io *tio)
md = tio->io->md; md = tio->io->md;
dec_pending(tio->io, r); dec_pending(tio->io, r);
free_tio(md, tio); free_tio(md, tio);
} else if (r) { } else if (r != DM_MAPIO_SUBMITTED) {
DMWARN("unimplemented target map return value: %d", r); DMWARN("unimplemented target map return value: %d", r);
BUG(); BUG();
} }
......
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