dm: fix the second dec_pending() argument in __split_and_process_bio()
authorBart Van Assche <[email protected]>
Wed, 9 Aug 2017 18:32:10 +0000 (11:32 -0700)
committerMike Snitzer <[email protected]>
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Tested-by: Laurence Oberman <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
drivers/md/dm.c

index 2edbcc2d7d3f6274b689447859470d2773ea4e3b..8298670757e9c4c964ba270715944a1be48ac6f3 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