Skip to content

Commit e1262cd

Browse files
Xu Yihangtytso
authored andcommitted
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: [email protected] Fixes: aa75f4d ("ext4: main fast-commit commit path") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Xu Yihang <[email protected]> Reviewed-by: Harshad Shirwadkar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 83fe6b1 commit e1262cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ext4/fast_commit.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,10 @@ static int ext4_fc_perform_commit(journal_t *journal)
10881088
head.fc_tid = cpu_to_le32(
10891089
sbi->s_journal->j_running_transaction->t_tid);
10901090
if (!ext4_fc_add_tlv(sb, EXT4_FC_TAG_HEAD, sizeof(head),
1091-
(u8 *)&head, &crc))
1091+
(u8 *)&head, &crc)) {
1092+
ret = -ENOSPC;
10921093
goto out;
1094+
}
10931095
}
10941096

10951097
spin_lock(&sbi->s_fc_lock);

0 commit comments

Comments
 (0)