e2fsck: force-reread of inode from disk when re-checking a checksum error

When we're rechecking an inode checksum failure, we need to force the
inode to be re-read from disk so that the verification routine runs,
so drop the stashed inode.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
crypto
Darrick J. Wong 2014-12-11 17:48:03 -05:00 committed by Theodore Ts'o
parent a93a90d2ae
commit 250304879a
1 changed files with 1 additions and 0 deletions

View File

@ -663,6 +663,7 @@ static errcode_t recheck_bad_inode_checksum(ext2_filsys fs, ext2_ino_t ino,
* Reread inode. If we don't see checksum error, then this inode
* has been fixed elsewhere.
*/
ctx->stashed_ino = 0;
retval = ext2fs_read_inode_full(fs, ino, (struct ext2_inode *)&inode,
sizeof(inode));
if (retval && retval != EXT2_ET_INODE_CSUM_INVALID)