ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry()

Previously a bad directory block with a bad checksum is skipped; we
should be returning EFSBADCRC (aka EBADMSG).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o 2017-06-23 00:47:05 -04:00
parent 6febe6f253
commit bdddf34279

View file

@ -1456,7 +1456,8 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
EXT4_ERROR_INODE(dir, "checksumming directory " EXT4_ERROR_INODE(dir, "checksumming directory "
"block %lu", (unsigned long)block); "block %lu", (unsigned long)block);
brelse(bh); brelse(bh);
goto next; ret = ERR_PTR(-EFSBADCRC);
goto cleanup_and_exit;
} }
set_buffer_verified(bh); set_buffer_verified(bh);
i = search_dirblock(bh, dir, &fname, i = search_dirblock(bh, dir, &fname,