X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fblock.h;h=16043a01294df83c88f96fd01534fc879abfce37;hb=5ec891b9a67f6c055619f51e91d0077c614f92f5;hp=e8258bfece9babaf3e0741f1baaa5bd33c6f314d;hpb=fa7c32a4ef302e709f138e7307b6dbe5efd16e0d;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index e8258bfe..16043a01 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -313,11 +313,7 @@ TRACE_EVENT(block_bio_bounce, */ TRACE_EVENT(block_bio_complete, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) - TP_PROTO(struct bio *bio, int error), - - TP_ARGS(bio, error), -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) TP_PROTO(struct request_queue *q, struct bio *bio, int error), TP_ARGS(q, bio, error), @@ -369,7 +365,7 @@ DECLARE_EVENT_CLASS(block_bio, ), TP_fast_assign( - tp_assign(dev, bio->bi_bdev->bd_dev) + tp_assign(dev, bio->bi_bdev ? bio->bi_bdev->bd_dev : 0) tp_assign(sector, bio->bi_sector) tp_assign(nr_sector, bio->bi_size >> 9) blk_fill_rwbs(rwbs, bio->bi_rw, bio->bi_size)