File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2984,12 +2984,9 @@ static struct request *blk_mq_get_new_requests(struct request_queue *q,
2984
2984
}
2985
2985
2986
2986
rq = __blk_mq_alloc_requests (& data );
2987
- if (rq )
2988
- return rq ;
2989
- rq_qos_cleanup (q , bio );
2990
- if (bio -> bi_opf & REQ_NOWAIT )
2991
- bio_wouldblock_error (bio );
2992
- return NULL ;
2987
+ if (unlikely (!rq ))
2988
+ rq_qos_cleanup (q , bio );
2989
+ return rq ;
2993
2990
}
2994
2991
2995
2992
/*
@@ -3129,8 +3126,11 @@ void blk_mq_submit_bio(struct bio *bio)
3129
3126
blk_mq_use_cached_rq (rq , plug , bio );
3130
3127
} else {
3131
3128
rq = blk_mq_get_new_requests (q , plug , bio , nr_segs );
3132
- if (unlikely (!rq ))
3129
+ if (unlikely (!rq )) {
3130
+ if (bio -> bi_opf & REQ_NOWAIT )
3131
+ bio_wouldblock_error (bio );
3133
3132
goto queue_exit ;
3133
+ }
3134
3134
}
3135
3135
3136
3136
trace_block_getrq (bio );
You can’t perform that action at this time.
0 commit comments