On 6/25/25 2:33 AM, Damien Le Moal wrote:
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4806b867e37d..0c61492724d2 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3169,8 +3169,10 @@ void blk_mq_submit_bio(struct bio *bio)
        if (blk_mq_attempt_bio_merge(q, bio, nr_segs))
                goto queue_exit;
- if (blk_queue_is_zoned(q) && blk_zone_plug_bio(bio, nr_segs))
-               goto queue_exit;
+       if (bio_needs_zone_write_plugging(bio)) {
+               if (blk_zone_plug_bio(bio, nr_segs))
+                       goto queue_exit;
+       }

Why nested if-statements instead of keeping "&&"? I prefer "&&".

Thanks,

Bart.

Reply via email to