Browse Source

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>
Theodore Ts'o 8 years ago
parent
commit
bdddf34279
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fs/ext4/namei.c

+ 2 - 1
fs/ext4/namei.c

@@ -1456,7 +1456,8 @@ restart:
 			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,