[PATCH V4 14/45] block: blk-merge: remove unnecessary check

From
Ming Lei <hidden>
Date
2017-12-18 12:22:16
Also in
linux-fsdevel, linux-mm, lkml
Reply to
Ming Lei, 2017-12-18
In this case, 'sectors' can't be zero at all, so remove the check
and let the bio be splitted.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <redacted>
---
 block/blk-merge.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 42ceb89bc566..39f2c1113423 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,
 				nsegs++;
 				sectors = max_sectors;
 			}
-			if (sectors)
-				goto split;
-			/* Make this single bvec as the 1st segment */
+			goto split;
 		}
 
 		if (bvprvp && blk_queue_cluster(q)) {
-- 
2.9.5
Thread (54 messages) 54 messages, 3 authors, last reply 2018-01-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help