@@ -864,14 +864,10 @@ static struct request *attempt_merge(struct request_queue *q,
864
864
if (req_op (req ) != req_op (next ))
865
865
return NULL ;
866
866
867
- if (req -> bio && next -> bio ) {
868
- /* Don't merge requests with different write hints. */
869
- if (req -> bio -> bi_write_hint != next -> bio -> bi_write_hint )
870
- return NULL ;
871
- if (req -> bio -> bi_ioprio != next -> bio -> bi_ioprio )
872
- return NULL ;
873
- }
874
-
867
+ if (req -> bio -> bi_write_hint != next -> bio -> bi_write_hint )
868
+ return NULL ;
869
+ if (req -> bio -> bi_ioprio != next -> bio -> bi_ioprio )
870
+ return NULL ;
875
871
if (!blk_atomic_write_mergeable_rqs (req , next ))
876
872
return NULL ;
877
873
@@ -983,26 +979,16 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
983
979
if (req_op (rq ) != bio_op (bio ))
984
980
return false;
985
981
986
- /* don't merge across cgroup boundaries */
987
982
if (!blk_cgroup_mergeable (rq , bio ))
988
983
return false;
989
-
990
- /* only merge integrity protected bio into ditto rq */
991
984
if (blk_integrity_merge_bio (rq -> q , rq , bio ) == false)
992
985
return false;
993
-
994
- /* Only merge if the crypt contexts are compatible */
995
986
if (!bio_crypt_rq_ctx_compatible (rq , bio ))
996
987
return false;
997
-
998
- if (rq -> bio ) {
999
- /* Don't merge requests with different write hints. */
1000
- if (rq -> bio -> bi_write_hint != bio -> bi_write_hint )
1001
- return false;
1002
- if (rq -> bio -> bi_ioprio != bio -> bi_ioprio )
1003
- return false;
1004
- }
1005
-
988
+ if (rq -> bio -> bi_write_hint != bio -> bi_write_hint )
989
+ return false;
990
+ if (rq -> bio -> bi_ioprio != bio -> bi_ioprio )
991
+ return false;
1006
992
if (blk_atomic_write_mergeable_rq_bio (rq , bio ) == false)
1007
993
return false;
1008
994
0 commit comments