Skip to content

Commit bc3b1e9

Browse files
YuKuai-huaweiaxboe
authored andcommitted
block, bfq: merge bfq_release_process_ref() into bfq_put_cooperator()
Because bfq_put_cooperator() is always followed by bfq_release_process_ref(). Signed-off-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 73aeab3 commit bc3b1e9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

block/bfq-cgroup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,6 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
736736
*/
737737
bfq_put_cooperator(sync_bfqq);
738738
bic_set_bfqq(bic, NULL, true, act_idx);
739-
bfq_release_process_ref(bfqd, sync_bfqq);
740739
}
741740
}
742741

block/bfq-iosched.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5434,6 +5434,8 @@ void bfq_put_cooperator(struct bfq_queue *bfqq)
54345434
bfq_put_queue(__bfqq);
54355435
__bfqq = next;
54365436
}
5437+
5438+
bfq_release_process_ref(bfqq->bfqd, bfqq);
54375439
}
54385440

54395441
static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
@@ -5446,8 +5448,6 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
54465448
bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: %p, %d", bfqq, bfqq->ref);
54475449

54485450
bfq_put_cooperator(bfqq);
5449-
5450-
bfq_release_process_ref(bfqd, bfqq);
54515451
}
54525452

54535453
static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync,
@@ -6734,8 +6734,6 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
67346734
bic_set_bfqq(bic, NULL, true, bfqq->actuator_idx);
67356735

67366736
bfq_put_cooperator(bfqq);
6737-
6738-
bfq_release_process_ref(bfqq->bfqd, bfqq);
67396737
return NULL;
67406738
}
67416739

0 commit comments

Comments
 (0)