fs/adfs: dir: fix error return code in adfs_fplus_read()
PATCH 1/1 fs/adfs: dir: fix error return code in adfs_fplus_read()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zhen Lei <[email protected]>
--- fs/adfs/dir_fplus.c | 1 + 1 file changed, 1 insertion(+)
fs/adfs/dir_fplus.c +1 -0
@@ -142,6 +142,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr, }if (adfs_fplus_checkbyte (dir) != t->bigdircheckbyte) { + ret = -EIO ;adfs_error (sb,"dir %06x checkbyte mismatch\n" , indaddr); goto out; }
Signature · 1 line
2.25.1