gfs2: Improve gfs2_make_fs_rw error handling
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 31 Jan 2023 14:06:53 +0000 (15:06 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 31 Jan 2023 21:40:24 +0000 (22:40 +0100)
commitb66f723bb552ad59c2acb5d45ea45c890f84498b
treee0c9c8bb2004671f0f0f7f26e140bd4320cde87d
parent445cb1277e10d7e19b631ef8a64aa3f055df377d
gfs2: Improve gfs2_make_fs_rw error handling

In gfs2_make_fs_rw(), make sure to call gfs2_consist() to report an
inconsistency and mark the filesystem as withdrawn when
gfs2_find_jhead() fails.

At the end of gfs2_make_fs_rw(), when we discover that the filesystem
has been withdrawn, make sure we report an error.  This also replaces
the gfs2_withdrawn() check after gfs2_find_jhead().

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: syzbot+f51cb4b9afbd87ec06f2@syzkaller.appspotmail.com
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/super.c