diff options
author | Jan Kara <jack@suse.cz> | 2019-11-05 17:44:17 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-11-05 16:00:48 -0500 |
commit | a9a8344ee1714f835ba394077e8c13d751e2f148 (patch) | |
tree | e1c8c2ca02986fb433198e68a89137339be74e99 /include/linux/jbd2.h | |
parent | a413036791d040e33badcc634453a4d0c0705499 (diff) | |
download | linux-stable-a9a8344ee1714f835ba394077e8c13d751e2f148.tar.gz linux-stable-a9a8344ee1714f835ba394077e8c13d751e2f148.tar.bz2 linux-stable-a9a8344ee1714f835ba394077e8c13d751e2f148.zip |
ext4, jbd2: Provide accessor function for handle credits
Provide accessor function to get number of credits available in a handle
and use it from ext4. Later, computation of available credits won't be
so straightforward.
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-11-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 10e6049c0ba9..727ff91d7f3e 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -1645,6 +1645,12 @@ static inline tid_t jbd2_get_latest_transaction(journal_t *journal) return tid; } + +static inline int jbd2_handle_buffer_credits(handle_t *handle) +{ + return handle->h_buffer_credits; +} + #ifdef __KERNEL__ #define buffer_trace_init(bh) do {} while (0) |