aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2024-06-24 17:01:17 +0000
committerTheodore Ts'o <[email protected]>2024-07-09 03:59:37 +0000
commit4aa99c71e42ad60178c1154ec24e3df9c684fb67 (patch)
tree1b11cb5f1a34c8273fee08a8d252b1d4286e3b0f /fs/jbd2/commit.c
parentjbd2: avoid mount failed when commit block is partial submitted (diff)
downloadkernel-4aa99c71e42ad60178c1154ec24e3df9c684fb67.tar.gz
kernel-4aa99c71e42ad60178c1154ec24e3df9c684fb67.zip
jbd2: make jbd2_journal_get_max_txn_bufs() internal
There's no reason to have jbd2_journal_get_max_txn_bufs() public function. Currently all users are internal and can use journal->j_max_transaction_buffers instead. This saves some unnecessary recomputations of the limit as a bonus which becomes important as this function gets more complex in the following patch. CC: [email protected] Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
-rw-r--r--fs/jbd2/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index ec5ed7eb1938..4305a1ac808a 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -766,7 +766,7 @@ start_journal_io:
if (first_block < journal->j_tail)
freed += journal->j_last - journal->j_first;
/* Update tail only if we free significant amount of space */
- if (freed < jbd2_journal_get_max_txn_bufs(journal))
+ if (freed < journal->j_max_transaction_buffers)
update_tail = 0;
}
J_ASSERT(commit_transaction->t_state == T_COMMIT);