Skip to contentSkip to conversation

fs/adfs: bigdir: Fix another error code in adfs_fplus_read()

PATCH New Dan Carpenter 1 participant 1 message Dec 14, 2020 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/adfs: bigdir: Fix another error code in adfs_fplus_read()

This should return -EINVAL if the checkbyte is wrong instead of success.

Fixes d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")

---
Sorry for not catching this one last time. :/

 fs/adfs/dir_fplus.c | 1 +
 1 file changed, 1 insertion(+)
fs/adfs/dir_fplus.c +1 -0
index 4a15924014da..a5e47c94a5b9 100644
@@ -143,6 +143,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
 
 	if (adfs_fplus_checkbyte(dir) != t->bigdircheckbyte) {
 		adfs_error(sb, "dir %06x checkbyte mismatch\n", indaddr);
+		ret = -EINVAL;
 		goto out;
 	}
 
Signature · 1 line
2.29.2