dm: fix the second dec_pending() argument in __split_and_process_bio()
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 9 Aug 2017 18:32:10 +0000 (11:32 -0700)
committerMike Snitzer <snitzer@redhat.com>
Mon, 28 Aug 2017 13:36:19 +0000 (09:36 -0400)
Detected by sparse.

Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c

index 2edbcc2..8298670 100644 (file)
@@ -1523,7 +1523,7 @@ static void __split_and_process_bio(struct mapped_device *md,
        }
 
        /* drop the extra reference count */
-       dec_pending(ci.io, error);
+       dec_pending(ci.io, errno_to_blk_status(error));
 }
 /*-----------------------------------------------------------------
  * CRUD END