* [PATCH] ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry()
@ 2017-06-23 4:47 Theodore Ts'o
0 siblings, 0 replies; only message in thread
From: Theodore Ts'o @ 2017-06-23 4:47 UTC (permalink / raw)
To: Ext4 Developers List; +Cc: Theodore Ts'o
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>
---
fs/ext4/namei.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 2a7f2dc7f4dd..13f0cadb1238 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1456,7 +1456,8 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
EXT4_ERROR_INODE(dir, "checksumming directory "
"block %lu", (unsigned long)block);
brelse(bh);
- goto next;
+ ret = ERR_PTR(-EFSBADCRC);
+ goto cleanup_and_exit;
}
set_buffer_verified(bh);
i = search_dirblock(bh, dir, &fname,
--
2.11.0.rc0.7.gbe5a750
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-23 4:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23 4:47 [PATCH] ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).