Commit e1262cd2 authored by Xu Yihang's avatar Xu Yihang Committed by Theodore Ts'o

ext4: fix error return code in ext4_fc_perform_commit()

In case of if not ext4_fc_add_tlv branch, an error return code is missing.

Cc: stable@kernel.org
Fixes: aa75f4d3 ("ext4: main fast-commit commit path")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarXu Yihang <xuyihang@huawei.com>
Reviewed-by: default avatarHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20210408070033.123047-1-xuyihang@huawei.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 83fe6b18
...@@ -1088,9 +1088,11 @@ static int ext4_fc_perform_commit(journal_t *journal) ...@@ -1088,9 +1088,11 @@ static int ext4_fc_perform_commit(journal_t *journal)
head.fc_tid = cpu_to_le32( head.fc_tid = cpu_to_le32(
sbi->s_journal->j_running_transaction->t_tid); sbi->s_journal->j_running_transaction->t_tid);
if (!ext4_fc_add_tlv(sb, EXT4_FC_TAG_HEAD, sizeof(head), if (!ext4_fc_add_tlv(sb, EXT4_FC_TAG_HEAD, sizeof(head),
(u8 *)&head, &crc)) (u8 *)&head, &crc)) {
ret = -ENOSPC;
goto out; goto out;
} }
}
spin_lock(&sbi->s_fc_lock); spin_lock(&sbi->s_fc_lock);
ret = ext4_fc_commit_dentry_updates(journal, &crc); ret = ext4_fc_commit_dentry_updates(journal, &crc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment