summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-io.c')
-rw-r--r--drivers/md/dm-io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index 3702e502466d..c8f8f3004085 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -124,7 +124,7 @@ static void complete_io(struct io *io)
124 fn(error_bits, context); 124 fn(error_bits, context);
125} 125}
126 126
127static void dec_count(struct io *io, unsigned int region, int error) 127static void dec_count(struct io *io, unsigned int region, blk_status_t error)
128{ 128{
129 if (error) 129 if (error)
130 set_bit(region, &io->error_bits); 130 set_bit(region, &io->error_bits);
@@ -137,9 +137,9 @@ static void endio(struct bio *bio)
137{ 137{
138 struct io *io; 138 struct io *io;
139 unsigned region; 139 unsigned region;
140 int error; 140 blk_status_t error;
141 141
142 if (bio->bi_error && bio_data_dir(bio) == READ) 142 if (bio->bi_status && bio_data_dir(bio) == READ)
143 zero_fill_bio(bio); 143 zero_fill_bio(bio);
144 144
145 /* 145 /*
@@ -147,7 +147,7 @@ static void endio(struct bio *bio)
147 */ 147 */
148 retrieve_io_and_region_from_bio(bio, &io, &region); 148 retrieve_io_and_region_from_bio(bio, &io, &region);
149 149
150 error = bio->bi_error; 150 error = bio->bi_status;
151 bio_put(bio); 151 bio_put(bio);
152 152
153 dec_count(io, region, error); 153 dec_count(io, region, error);
@@ -319,7 +319,7 @@ static void do_region(int op, int op_flags, unsigned region,
319 if ((op == REQ_OP_DISCARD || op == REQ_OP_WRITE_ZEROES || 319 if ((op == REQ_OP_DISCARD || op == REQ_OP_WRITE_ZEROES ||
320 op == REQ_OP_WRITE_SAME) && 320 op == REQ_OP_WRITE_SAME) &&
321 special_cmd_max_sectors == 0) { 321 special_cmd_max_sectors == 0) {
322 dec_count(io, region, -EOPNOTSUPP); 322 dec_count(io, region, BLK_STS_NOTSUPP);
323 return; 323 return;
324 } 324 }
325 325