block: blk-merge: remove unnecessary check
authorMing Lei <ming.lei@redhat.com>
Mon, 18 Dec 2017 12:22:16 +0000 (20:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
In this case, 'sectors' can't be zero at all, so remove the check
and let the bio be split.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c

index ca2e7aec8e7772b7a694983d88a5c3d9007c3819..446f63e076aa913352f8dae0ddc1b4e87e266769 100644 (file)
@@ -129,9 +129,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
                                nsegs++;
                                sectors = max_sectors;
                        }
-                       if (sectors)
-                               goto split;
-                       /* Make this single bvec as the 1st segment */
+                       goto split;
                }
 
                if (bvprvp && blk_queue_cluster(q)) {