@@ -6877,7 +6877,6 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
6877
6877
const int is_sync = rq_is_sync (rq );
6878
6878
struct bfq_queue * bfqq ;
6879
6879
bool new_queue = false;
6880
- bool bfqq_already_existing = false;
6881
6880
unsigned int a_idx = bfq_actuator_index (bfqd , bio );
6882
6881
6883
6882
if (unlikely (!rq -> elv .icq ))
@@ -6918,31 +6917,27 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
6918
6917
bfqq = bfq_get_bfqq_handle_split (bfqd , bic , bio ,
6919
6918
true, is_sync ,
6920
6919
NULL );
6921
- if (unlikely (bfqq == & bfqd -> oom_bfqq ))
6922
- bfqq_already_existing = true;
6923
- else
6920
+ if (likely (bfqq != & bfqd -> oom_bfqq )) {
6924
6921
bfq_bfqq_resume_state (bfqq , bfqd , bic ,
6925
6922
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
+ }
6926
6938
} else {
6927
- bfqq_already_existing = true;
6928
6939
bfq_bfqq_resume_state (bfqq , bfqd , bic , true);
6929
6940
}
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
- }
6946
6941
}
6947
6942
}
6948
6943
0 commit comments