Commit e86e70d2 authored by Jan Kara's avatar Jan Kara Committed by Yang Yingliang
Browse files

ext4: Provide function to handle transaction restarts



mainline inclusion
from mainline-5.5-rc1
commit a4130367
category: bugfix
bugzilla: 25031
CVE: NA
---------------------------

Provide ext4_journal_ensure_credits_fn() function to ensure transaction
has given amount of credits and call helper function to prepare for
restarting a transaction. This allows to remove some boilerplate code
from various places, add proper error handling for the case where
transaction extension or restart fails, and reduces following changes
needed for proper revoke record reservation tracking.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-10-jack@suse.cz


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

Conflict:
  fs/ext4/ext4.h

Signed-off-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: default avatarYang Erkun <yangerkun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent d6cf3853
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment