diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-06-04 00:13:28 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-04 21:23:38 -0600 |
commit | 48bc3cd3e07a1486f45d9971c75d6090976c3b1b (patch) | |
tree | 4fa25144ad5789564d352f25960c245cae784755 | |
parent | 15b81ce5abdc4b502aa31dff2d415b79d2349d2f (diff) | |
download | linux-stable-48bc3cd3e07a1486f45d9971c75d6090976c3b1b.tar.gz linux-stable-48bc3cd3e07a1486f45d9971c75d6090976c3b1b.tar.bz2 linux-stable-48bc3cd3e07a1486f45d9971c75d6090976c3b1b.zip |
blktrace: use errno instead of bi_status
In blk_add_trace_spliti() blk_add_trace_bio_remap() use
blk_status_to_errno() to pass the error instead of pasing the bi_status.
This fixes the sparse warning.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | kernel/trace/blktrace.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 1e5499414cdf..e2013bd0e2a6 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -995,8 +995,10 @@ static void blk_add_trace_split(void *ignore, __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, bio_op(bio), bio->bi_opf, - BLK_TA_SPLIT, bio->bi_status, sizeof(rpdu), - &rpdu, blk_trace_bio_get_cgid(q, bio)); + BLK_TA_SPLIT, + blk_status_to_errno(bio->bi_status), + sizeof(rpdu), &rpdu, + blk_trace_bio_get_cgid(q, bio)); } rcu_read_unlock(); } @@ -1033,7 +1035,8 @@ static void blk_add_trace_bio_remap(void *ignore, r.sector_from = cpu_to_be64(from); __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, - bio_op(bio), bio->bi_opf, BLK_TA_REMAP, bio->bi_status, + bio_op(bio), bio->bi_opf, BLK_TA_REMAP, + blk_status_to_errno(bio->bi_status), sizeof(r), &r, blk_trace_bio_get_cgid(q, bio)); rcu_read_unlock(); } |