summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/jbd2.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 587c146d3987..842b62606025 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1627,10 +1627,14 @@ static inline tid_t jbd2_get_latest_transaction(journal_t *journal)
return tid;
}
-
static inline int jbd2_handle_buffer_credits(handle_t *handle)
{
- journal_t *journal = handle->h_transaction->t_journal;
+ journal_t *journal;
+
+ if (!handle->h_reserved)
+ journal = handle->h_transaction->t_journal;
+ else
+ journal = handle->h_journal;
return handle->h_total_credits -
DIV_ROUND_UP(handle->h_revoke_credits_requested,