@@ -6877,7 +6877,6 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
68776877 const int is_sync = rq_is_sync (rq );
68786878 struct bfq_queue * bfqq ;
68796879 bool new_queue = false;
6880- bool bfqq_already_existing = false;
68816880 unsigned int a_idx = bfq_actuator_index (bfqd , bio );
68826881
68836882 if (unlikely (!rq -> elv .icq ))
@@ -6918,31 +6917,27 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
69186917 bfqq = bfq_get_bfqq_handle_split (bfqd , bic , bio ,
69196918 true, is_sync ,
69206919 NULL );
6921- if (unlikely (bfqq == & bfqd -> oom_bfqq ))
6922- bfqq_already_existing = true;
6923- else
6920+ if (likely (bfqq != & bfqd -> oom_bfqq )) {
69246921 bfq_bfqq_resume_state (bfqq , bfqd , bic ,
69256922 false);
6923+ bfqq -> waker_bfqq = waker_bfqq ;
6924+ bfqq -> tentative_waker_bfqq = NULL ;
6925+
6926+ /*
6927+ * If the waker queue disappears, then
6928+ * new_bfqq->waker_bfqq must be
6929+ * reset. So insert new_bfqq into the
6930+ * woken_list of the waker. See
6931+ * bfq_check_waker for details.
6932+ */
6933+ if (waker_bfqq )
6934+ hlist_add_head (
6935+ & bfqq -> woken_list_node ,
6936+ & bfqq -> waker_bfqq -> woken_list );
6937+ }
69266938 } else {
6927- bfqq_already_existing = true;
69286939 bfq_bfqq_resume_state (bfqq , bfqd , bic , true);
69296940 }
6930-
6931- if (!bfqq_already_existing ) {
6932- bfqq -> waker_bfqq = waker_bfqq ;
6933- bfqq -> tentative_waker_bfqq = NULL ;
6934-
6935- /*
6936- * If the waker queue disappears, then
6937- * new_bfqq->waker_bfqq must be
6938- * reset. So insert new_bfqq into the
6939- * woken_list of the waker. See
6940- * bfq_check_waker for details.
6941- */
6942- if (waker_bfqq )
6943- hlist_add_head (& bfqq -> woken_list_node ,
6944- & bfqq -> waker_bfqq -> woken_list );
6945- }
69466941 }
69476942 }
69486943
0 commit comments