aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/blktrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 638711c17504..4f149944cb89 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -661,10 +661,10 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,
661 if (likely(!bt)) 661 if (likely(!bt))
662 return; 662 return;
663 663
664 if (blk_discard_rq(rq)) 664 if (rq->cmd_flags & REQ_DISCARD)
665 rw |= (1 << BIO_RW_DISCARD); 665 rw |= (1 << BIO_RW_DISCARD);
666 666
667 if (blk_pc_request(rq)) { 667 if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
668 what |= BLK_TC_ACT(BLK_TC_PC); 668 what |= BLK_TC_ACT(BLK_TC_PC);
669 __blk_add_trace(bt, 0, blk_rq_bytes(rq), rw, 669 __blk_add_trace(bt, 0, blk_rq_bytes(rq), rw,
670 what, rq->errors, rq->cmd_len, rq->cmd); 670 what, rq->errors, rq->cmd_len, rq->cmd);
@@ -925,7 +925,7 @@ void blk_add_driver_data(struct request_queue *q,
925 if (likely(!bt)) 925 if (likely(!bt))
926 return; 926 return;
927 927
928 if (blk_pc_request(rq)) 928 if (rq->cmd_type == REQ_TYPE_BLOCK_PC)
929 __blk_add_trace(bt, 0, blk_rq_bytes(rq), 0, 929 __blk_add_trace(bt, 0, blk_rq_bytes(rq), 0,
930 BLK_TA_DRV_DATA, rq->errors, len, data); 930 BLK_TA_DRV_DATA, rq->errors, len, data);
931 else 931 else
@@ -1730,7 +1730,7 @@ void blk_dump_cmd(char *buf, struct request *rq)
1730 int len = rq->cmd_len; 1730 int len = rq->cmd_len;
1731 unsigned char *cmd = rq->cmd; 1731 unsigned char *cmd = rq->cmd;
1732 1732
1733 if (!blk_pc_request(rq)) { 1733 if (rq->cmd_type != REQ_TYPE_BLOCK_PC) {
1734 buf[0] = '\0'; 1734 buf[0] = '\0';
1735 return; 1735 return;
1736 } 1736 }
@@ -1779,7 +1779,7 @@ void blk_fill_rwbs_rq(char *rwbs, struct request *rq)
1779 int rw = rq->cmd_flags & 0x03; 1779 int rw = rq->cmd_flags & 0x03;
1780 int bytes; 1780 int bytes;
1781 1781
1782 if (blk_discard_rq(rq)) 1782 if (rq->cmd_flags & REQ_DISCARD)
1783 rw |= (1 << BIO_RW_DISCARD); 1783 rw |= (1 << BIO_RW_DISCARD);
1784 1784
1785 bytes = blk_rq_bytes(rq); 1785 bytes = blk_rq_bytes(rq);