ext4: fix error return code in ext4_fc_perform_commit()
PATCH 1/1 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.
Fixes aa75f4d3daae ("ext4: main fast-commit commit path")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Xu Yihang <[email protected]>
--- fs/ext4/fast_commit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ext4/fast_commit.c +3 -1
@@ -1088,8 +1088,10 @@ static int ext4_fc_perform_commit(journal_t *journal) head.fc_tid =cpu_to_le32 ( sbi->s_journal->j_running_transaction->t_tid);if (!ext4_fc_add_tlv (sb,EXT4_FC_TAG_HEAD ,sizeof (head), - (u8 *)&head, &crc)) + (u8 *)&head, &crc)) { + ret = -ENOSPC ; goto out; + } }spin_lock (&sbi->s_fc_lock);
Signature · 1 line
2.17.1
Thanks, this looks good.
Reviewed-by Harshad Shirwadkar <[email protected]>
Quoted 29 lines · Xu Yihang
In case of if not
ext4_fc_add_tlvbranch, an error return code is missing.Fixes aa75f4d3daae ("ext4: main fast-commit commit path")Reported-by Hulk Robot <[email protected]>Signed-off-by Xu Yihang <[email protected]>--- fs/ext4/fast_commit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/ext4/fast_commit.c +3
-2@@ -1088,8 +1088,10 @@ static int ext4_fc_perform_commit(journal_t *journal) head.fc_tid =cpu_to_le32 ( sbi->s_journal->j_running_transaction->t_tid);if (!ext4_fc_add_tlv (sb,EXT4_FC_TAG_HEAD ,sizeof (head), - (u8 *)&head, &crc)) + (u8 *)&head, &crc)) { + ret = -ENOSPC ; goto out; + } }spin_lock (&sbi->s_fc_lock); --2.17.1
Quoted 5 lines · Xu Yihang
In case of if not
ext4_fc_add_tlvbranch, an error return code is missing.Fixes aa75f4d3daae ("ext4: main fast-commit commit path")Reported-by Hulk Robot <[email protected]>Signed-off-by Xu Yihang <[email protected]>
Thanks, applied.
- Ted