Skip to content

Commit

Permalink
e2fsck: force-reread of inode from disk when re-checking a checksum e…
Browse files Browse the repository at this point in the history
…rror

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>
  • Loading branch information
djwong authored and tytso committed Dec 11, 2014
1 parent a93a90d commit 2503048
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions e2fsck/pass1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2503048

Please sign in to comment.