We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d82f3b commit 2753328Copy full SHA for 2753328
block/blk-rq-qos.h
@@ -142,8 +142,14 @@ static inline void rq_qos_done_bio(struct bio *bio)
142
bio->bi_bdev && (bio_flagged(bio, BIO_QOS_THROTTLED) ||
143
bio_flagged(bio, BIO_QOS_MERGED))) {
144
struct request_queue *q = bdev_get_queue(bio->bi_bdev);
145
- if (q->rq_qos)
146
- __rq_qos_done_bio(q->rq_qos, bio);
+
+ /*
147
+ * If a bio has BIO_QOS_xxx set, it implicitly implies that
148
+ * q->rq_qos is present. So, we skip re-checking q->rq_qos
149
+ * here as an extra optimization and directly call
150
+ * __rq_qos_done_bio().
151
+ */
152
+ __rq_qos_done_bio(q->rq_qos, bio);
153
}
154
155
0 commit comments