OSDN Git Service

Better fix for marking fs err in superblock if err set in journal superblock.
authorKen Sumrall <ksumrall@android.com>
Tue, 5 Jun 2012 18:59:36 +0000 (11:59 -0700)
committerKen Sumrall <ksumrall@android.com>
Thu, 7 Jun 2012 03:59:22 +0000 (20:59 -0700)
commit46e96be157785a3582844efb27f4eef38943400b
treee50fdd266b28a16b461eb9b430857bc3cccbf274
parent8c157a2c73b27b3f3ae566be78279460a35ccbc1
Better fix for marking fs err in superblock if err set in journal superblock.

The previous fix of flushing out the superblock after setting the
EXT2_ERROR_FS flag was erroneous because running the journal could have
updated the superblock (but not the in-memory copy the code referenced).
So instead, check the journal error conditions after running the journal
and freeing and re-opening the filesystem.  Also, make sure to flush
the error state of the superblock to disk before clearing the error state
of the journal.

Change-Id: Ia5cde1a367d86992c9bd3bca652a1289935d1380
e2fsck/journal.c