summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2017-12-18 07:22:16 -0500
committerJens Axboe <axboe@kernel.dk>2018-01-06 11:18:00 -0500
commitcf8c0c6a3830583bd0e7c94933e155bf97cd162b (patch)
tree735b2032c497a0c5e539a64302c2c4396d22de42 /block/blk-merge.c
parenta2d37968d784363842f87820a21e106741d28004 (diff)
block: blk-merge: remove unnecessary check
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>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index ca2e7aec8e77..446f63e076aa 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -129,9 +129,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
129 nsegs++; 129 nsegs++;
130 sectors = max_sectors; 130 sectors = max_sectors;
131 } 131 }
132 if (sectors) 132 goto split;
133 goto split;
134 /* Make this single bvec as the 1st segment */
135 } 133 }
136 134
137 if (bvprvp && blk_queue_cluster(q)) { 135 if (bvprvp && blk_queue_cluster(q)) {