diff options
author | Jan Kara <jack@suse.cz> | 2019-11-05 19:44:25 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-11-06 00:00:48 +0300 |
commit | 77444ac4f9537bc4211f928959d5231445e30c6e (patch) | |
tree | 5e721925bb1f8dd20977e74441df5c1d34594339 /fs/jbd2/transaction.c | |
parent | 9f356e5a4f12008fa0df8b6385fc0ab830416e72 (diff) | |
download | linux-77444ac4f9537bc4211f928959d5231445e30c6e.tar.xz |
jbd2: Drop jbd2_space_needed()
The function is now just a trivial wrapper returning
journal->j_max_transaction_buffers. Drop it.
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-19-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r-- | fs/jbd2/transaction.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index ed7cf9e62584..ba388da7e02b 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -270,12 +270,13 @@ static int add_transaction_credits(journal_t *journal, int blocks, * *before* starting to dirty potentially checkpointed buffers * in the new transaction. */ - if (jbd2_log_space_left(journal) < jbd2_space_needed(journal)) { + if (jbd2_log_space_left(journal) < journal->j_max_transaction_buffers) { atomic_sub(total, &t->t_outstanding_credits); read_unlock(&journal->j_state_lock); jbd2_might_wait_for_commit(journal); write_lock(&journal->j_state_lock); - if (jbd2_log_space_left(journal) < jbd2_space_needed(journal)) + if (jbd2_log_space_left(journal) < + journal->j_max_transaction_buffers) __jbd2_log_wait_for_space(journal); write_unlock(&journal->j_state_lock); return 1; |