jbd2: fix infinite loop when recovering corrupt journal blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 27 Aug 2014 22:40:05 +0000 (18:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:28:36 +0000 (16:28 -0700)
commit666cec8db793a67bf9071b9f0fd96c8af424a9b9
tree524cc764cc0ce42d636cc44cb491807cbb69f9eb
parentd9fab037c6646f853cc71c0d5c740bd2981c48a2
jbd2: fix infinite loop when recovering corrupt journal blocks

commit 022eaa7517017efe4f6538750c2b59a804dc7df7 upstream.

When recovering the journal, don't fall into an infinite loop if we
encounter a corrupt journal block.  Instead, just skip the block and
return an error, which fails the mount and thus forces the user to run
a full filesystem fsck.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jbd2/recovery.c