Skip to content

Commit 48bc3cd

Browse files
ChaitanayaKulkarniaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 15b81ce commit 48bc3cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

kernel/trace/blktrace.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,8 +995,10 @@ static void blk_add_trace_split(void *ignore,
995995

996996
__blk_add_trace(bt, bio->bi_iter.bi_sector,
997997
bio->bi_iter.bi_size, bio_op(bio), bio->bi_opf,
998-
BLK_TA_SPLIT, bio->bi_status, sizeof(rpdu),
999-
&rpdu, blk_trace_bio_get_cgid(q, bio));
998+
BLK_TA_SPLIT,
999+
blk_status_to_errno(bio->bi_status),
1000+
sizeof(rpdu), &rpdu,
1001+
blk_trace_bio_get_cgid(q, bio));
10001002
}
10011003
rcu_read_unlock();
10021004
}
@@ -1033,7 +1035,8 @@ static void blk_add_trace_bio_remap(void *ignore,
10331035
r.sector_from = cpu_to_be64(from);
10341036

10351037
__blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size,
1036-
bio_op(bio), bio->bi_opf, BLK_TA_REMAP, bio->bi_status,
1038+
bio_op(bio), bio->bi_opf, BLK_TA_REMAP,
1039+
blk_status_to_errno(bio->bi_status),
10371040
sizeof(r), &r, blk_trace_bio_get_cgid(q, bio));
10381041
rcu_read_unlock();
10391042
}

0 commit comments

Comments
 (0)