On 7/9/19 2:02 AM, Damien Le Moal wrote:
+static inline struct blk_plug *blk_mq_plug(struct request_queue *q,
+ struct bio *bio)
+{
+ struct blk_plug *plug = current->plug;
+
+ if (!blk_queue_is_zoned(q) || !op_is_write(bio_op(bio)))
+ return plug;
+
+ /* Zoned block device write case: do not plug the BIO */
+ return NULL;
+}
Can the 'plug' variable be left out from this function and can 'return
plug' be changed into 'return current->plug'? Anyway:
Reviewed-by: Bart Van Assche <[email protected]>