diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 45f9f06c3e68161d4fa9a9046a49c4d541d1562d..247f61fc6bfe81423108eef7e9ec3483d1eec169 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1443,7 +1443,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) * of the transaction. This needs to be done * once a transaction -bzzz */ - if (handle->h_total_credits <= 0) { + if (WARN_ON_ONCE(jbd2_handle_buffer_credits(handle) <= 0)) { ret = -ENOSPC; goto out_unlock_bh; }