On Fri 05-05-23 20:32:19, Zhang Yi wrote: > From: Zhang Yi <yi.zhang@xxxxxxxxxx> > > After t_checkpoint_io_list is gone, the 'released' parameter in > journal_shrink_one_cp_list() becomes useless, just remove it. > > Signed-off-by: Zhang Yi <yi.zhang@xxxxxxxxxx> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza > --- > fs/jbd2/checkpoint.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c > index 2b62154e9f1e..7b6320081f11 100644 > --- a/fs/jbd2/checkpoint.c > +++ b/fs/jbd2/checkpoint.c > @@ -387,15 +387,13 @@ static int journal_clean_one_cp_list(struct journal_head *jh, bool destroy) > * journal_shrink_one_cp_list > * > * Find 'nr_to_scan' written-back checkpoint buffers in the given list > - * and try to release them. If the whole transaction is released, set > - * the 'released' parameter. Return the number of released checkpointed > + * and try to release them. Return the number of released checkpointed > * buffers. > * > * Called with j_list_lock held. > */ > static unsigned long journal_shrink_one_cp_list(struct journal_head *jh, > - unsigned long *nr_to_scan, > - bool *released) > + unsigned long *nr_to_scan) > { > struct journal_head *last_jh; > struct journal_head *next_jh = jh; > @@ -416,10 +414,8 @@ static unsigned long journal_shrink_one_cp_list(struct journal_head *jh, > > nr_freed++; > ret = __jbd2_journal_remove_checkpoint(jh); > - if (ret) { > - *released = true; > + if (ret) > break; > - } > > if (need_resched()) > break; > @@ -441,7 +437,6 @@ unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal, > unsigned long *nr_to_scan) > { > transaction_t *transaction, *last_transaction, *next_transaction; > - bool released; > tid_t first_tid = 0, last_tid = 0, next_tid = 0; > tid_t tid = 0; > unsigned long nr_freed = 0; > @@ -474,10 +469,9 @@ unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal, > transaction = next_transaction; > next_transaction = transaction->t_cpnext; > tid = transaction->t_tid; > - released = false; > > nr_freed += journal_shrink_one_cp_list(transaction->t_checkpoint_list, > - nr_to_scan, &released); > + nr_to_scan); > if (*nr_to_scan == 0) > break; > if (need_resched() || spin_needbreak(&journal->j_list_lock)) > -- > 2.31.1 > -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR