| @@ -2854,11 +2854,11 @@ bfq_setup_stable_merge(struct bfq_data *bfqd, struct bfq_queue *bfqq, · 2853 unmodified lines |
| 2854 | { | 2854 | { |
| 2855 | int proc_ref = min(bfqq_process_refs(bfqq), | 2855 | int proc_ref = min(bfqq_process_refs(bfqq), |
| 2856 | bfqq_process_refs(stable_merge_bfqq)); | 2856 | bfqq_process_refs(stable_merge_bfqq)); |
| 2857 | struct bfq_queue *new_bfqq; | 2857 | struct bfq_queue *new_bfqq = NULL; |
| 2858 | | 2858 | |
| 2859 | if (idling_boosts_thr_without_issues(bfqd, bfqq) || | 2859 | bfqq_data->stable_merge_bfqq = NULL; |
| 2860 | proc_ref == 0) | 2860 | if (idling_boosts_thr_without_issues(bfqd, bfqq) || proc_ref == 0) |
| 2861 | return NULL; | 2861 | goto out; |
| 2862 | | 2862 | |
| 2863 | /* next function will take at least one ref */ | 2863 | /* next function will take at least one ref */ |
| 2864 | new_bfqq = bfq_setup_merge(bfqq, stable_merge_bfqq); | 2864 | new_bfqq = bfq_setup_merge(bfqq, stable_merge_bfqq); |
| @@ -2873,6 +2873,11 @@ bfq_setup_stable_merge(struct bfq_data *bfqd, struct bfq_queue *bfqq, · 8 unmodified lines |
| 2873 | new_bfqq_data->stably_merged = true; | 2873 | new_bfqq_data->stably_merged = true; |
| 2874 | } | 2874 | } |
| 2875 | } | 2875 | } |
| | 2876 | |
| | 2877 | out: |
| | 2878 | /* deschedule stable merge, because done or aborted here */ |
| | 2879 | bfq_put_stable_ref(stable_merge_bfqq); |
| | 2880 | |
| 2876 | return new_bfqq; | 2881 | return new_bfqq; |
| 2877 | } | 2882 | } |
| 2878 | | 2883 | |
| @@ -2933,11 +2938,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, · 54 unmodified lines |
| 2933 | struct bfq_queue *stable_merge_bfqq = | 2938 | struct bfq_queue *stable_merge_bfqq = |
| 2934 | bfqq_data->stable_merge_bfqq; | 2939 | bfqq_data->stable_merge_bfqq; |
| 2935 | | 2940 | |
| 2936 | /* deschedule stable merge, because done or aborted here */ | | |
| 2937 | bfq_put_stable_ref(stable_merge_bfqq); | | |
| 2938 | | | |
| 2939 | bfqq_data->stable_merge_bfqq = NULL; | | |
| 2940 | | | |
| 2941 | return bfq_setup_stable_merge(bfqd, bfqq, | 2941 | return bfq_setup_stable_merge(bfqd, bfqq, |
| 2942 | stable_merge_bfqq, | 2942 | stable_merge_bfqq, |
| 2943 | bfqq_data); | 2943 | bfqq_data); |