mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
jbd2: make b_frozen_data allocation always succeed
The b_frozen_data allocation should not be failed during journal
committing process, otherwise jbd2 will abort.
Since commit 490c1b444ce653d("jbd2: do not fail journal because of
frozen_buffer allocation failure") already added '__GFP_NOFAIL' flag
in do_get_write_access(), just add '__GFP_NOFAIL' flag for all allocations
in jbd2_journal_write_metadata_buffer(), like 'new_bh' allocation does.
Besides, remove all error handling branches for do_get_write_access().
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20241012085530.2147846-1-chengzhihao@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
27349b4d2e
commit
abe1ac7ca8
@@ -662,10 +662,6 @@ void jbd2_journal_commit_transaction(journal_t *journal)
|
||||
JBUFFER_TRACE(jh, "ph3: write metadata");
|
||||
escape = jbd2_journal_write_metadata_buffer(commit_transaction,
|
||||
jh, &wbuf[bufs], blocknr);
|
||||
if (escape < 0) {
|
||||
jbd2_journal_abort(journal, escape);
|
||||
continue;
|
||||
}
|
||||
jbd2_file_log_bh(&io_bufs, wbuf[bufs]);
|
||||
|
||||
/* Record the new block's tag in the current descriptor
|
||||
|
||||
Reference in New Issue
Block a user