Skip to content

Commit

Permalink
block, bfq: merge bfq_release_process_ref() into bfq_put_cooperator()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
YuKuai-huawei authored and axboe committed Sep 10, 2024
1 parent 73aeab3 commit bc3b1e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion block/bfq-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
*/
bfq_put_cooperator(sync_bfqq);
bic_set_bfqq(bic, NULL, true, act_idx);
bfq_release_process_ref(bfqd, sync_bfqq);
}
}

Expand Down
6 changes: 2 additions & 4 deletions block/bfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5434,6 +5434,8 @@ void bfq_put_cooperator(struct bfq_queue *bfqq)
bfq_put_queue(__bfqq);
__bfqq = next;
}

bfq_release_process_ref(bfqq->bfqd, bfqq);
}

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

bfq_put_cooperator(bfqq);

bfq_release_process_ref(bfqd, bfqq);
}

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

bfq_put_cooperator(bfqq);

bfq_release_process_ref(bfqq->bfqd, bfqq);
return NULL;
}

Expand Down

0 comments on commit bc3b1e9

Please sign in to comment.