diff options
Diffstat (limited to 'drivers/md/dm-io.c')
-rw-r--r-- | drivers/md/dm-io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index efc6659f9d6a..c84714f70378 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -138,6 +138,7 @@ static void endio(struct bio *bio) { struct io *io; unsigned region; + int error; if (bio->bi_error && bio_data_dir(bio) == READ) zero_fill_bio(bio); @@ -147,9 +148,10 @@ static void endio(struct bio *bio) */ retrieve_io_and_region_from_bio(bio, &io, ®ion); + error = bio->bi_error; bio_put(bio); - dec_count(io, region, bio->bi_error); + dec_count(io, region, error); } /*----------------------------------------------------------------- |