Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ int bio_split_io_at(struct bio *bio, const struct queue_limits *lim,
* there may either be too many discontiguous vectors for the max
* segments limit, or contain virtual boundary gaps without having a
* valid block sized split. A zero byte result means one of those
* conditions occured.
* conditions occurred.
*/
bytes = ALIGN_DOWN(bytes, bio_split_alignment(bio, lim));
if (!bytes)
Expand Down Expand Up @@ -547,7 +547,7 @@ static inline int ll_new_hw_segment(struct request *req, struct bio *bio,
if (!blk_cgroup_mergeable(req, bio))
goto no_merge;

if (blk_integrity_merge_bio(req->q, req, bio) == false)
if (!blk_integrity_merge_bio(req->q, req, bio))
goto no_merge;

/* discard request merge won't add new segment */
Expand Down Expand Up @@ -649,7 +649,7 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
if (!blk_cgroup_mergeable(req, next->bio))
return 0;

if (blk_integrity_merge_rq(q, req, next) == false)
if (!blk_integrity_merge_rq(q, req, next))
return 0;

if (!bio_crypt_ctx_merge_rq(req, next))
Expand Down Expand Up @@ -905,7 +905,7 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)

if (!blk_cgroup_mergeable(rq, bio))
return false;
if (blk_integrity_merge_bio(rq->q, rq, bio) == false)
if (!blk_integrity_merge_bio(rq->q, rq, bio))
return false;
if (!bio_crypt_rq_ctx_compatible(rq, bio))
return false;
Expand All @@ -915,7 +915,7 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
return false;
if (rq->bio->bi_ioprio != bio->bi_ioprio)
return false;
if (blk_atomic_write_mergeable_rq_bio(rq, bio) == false)
if (!blk_atomic_write_mergeable_rq_bio(rq, bio))
return false;

return true;
Expand Down