From: Jan Kara Date: Mon, 24 Jun 2024 17:01:20 +0000 (+0200) Subject: jbd2: drop pointless shrinker batch initialization X-Git-Tag: v6.11-rc1~122^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cf5b024a3ffa479ed14e520f81549fce037f322;p=thirdparty%2Flinux.git jbd2: drop pointless shrinker batch initialization In jbd2_journal_init_common() we set batch size of a shrinker shrinking checkpointed buffers to journal->j_max_transaction_buffers. But that is guaranteed to be 0 at that point so we effectively stay with the default shrinker batch size of 128. It has been like this since introduction of jbd2 shrinkers so just drop the pointless initialization. Signed-off-by: Jan Kara Reviewed-by: Zhang Yi Link: https://patch.msgid.link/20240624170127.3253-4-jack@suse.cz Signed-off-by: Theodore Ts'o --- diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 2ae861abf7709..25d373fac2f2f 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1617,7 +1617,6 @@ static journal_t *journal_init_common(struct block_device *bdev, journal->j_shrinker->scan_objects = jbd2_journal_shrink_scan; journal->j_shrinker->count_objects = jbd2_journal_shrink_count; - journal->j_shrinker->batch = journal->j_max_transaction_buffers; journal->j_shrinker->private_data = journal; shrinker_register(journal->j_shrinker);