return ext4_get_nojournal();
sb = handle->h_journal->j_private;
- trace_ext4_journal_start_reserved(sb, handle->h_buffer_credits,
- _RET_IP_);
+ trace_ext4_journal_start_reserved(sb,
+ jbd2_handle_buffer_credits(handle), _RET_IP_);
err = ext4_journal_check_start(sb);
if (err < 0) {
jbd2_journal_free_reserved(handle);
{
if (!ext4_handle_valid(handle))
return 0;
- if (handle->h_buffer_credits >= check_cred)
+ if (jbd2_handle_buffer_credits(handle) >= check_cred)
return 0;
return ext4_journal_extend(handle,
- extend_cred - handle->h_buffer_credits);
+ extend_cred - jbd2_handle_buffer_credits(handle));
}
static void ext4_journal_abort_handle(const char *caller, unsigned int line,
handle->h_type,
handle->h_line_no,
handle->h_requested_credits,
- handle->h_buffer_credits, err);
+ jbd2_handle_buffer_credits(handle), err);
return err;
}
ext4_error_inode(inode, where, line,
handle->h_type,
handle->h_line_no,
handle->h_requested_credits,
- handle->h_buffer_credits, err);
+ jbd2_handle_buffer_credits(handle),
+ err);
}
} else {
if (inode)
return 0;
}
-static inline int ext4_handle_has_enough_credits(handle_t *handle, int needed)
-{
- if (ext4_handle_valid(handle) && handle->h_buffer_credits < needed)
- return 0;
- return 1;
-}
-
#define ext4_journal_start_sb(sb, type, nblocks) \
__ext4_journal_start_sb((sb), __LINE__, (type), (nblocks), 0)