From: Alexey Velichayshiy Date: Mon, 29 Dec 2025 22:33:32 +0000 (-0500) Subject: gfs2: fix freeze error handling X-Git-Tag: v6.12.64~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a94048d99318b6132d0f271f04b3e62c74a71bb9;p=thirdparty%2Fkernel%2Fstable.git gfs2: fix freeze error handling [ Upstream commit 4cfc7d5a4a01d2133b278cdbb1371fba1b419174 ] After commit b77b4a4815a9 ("gfs2: Rework freeze / thaw logic"), the freeze error handling is broken because gfs2_do_thaw() overwrites the 'error' variable, causing incorrect processing of the original freeze error. Fix this by calling gfs2_do_thaw() when gfs2_lock_fs_check_clean() fails but ignoring its return value to preserve the original freeze error for proper reporting. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b77b4a4815a9 ("gfs2: Rework freeze / thaw logic") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Alexey Velichayshiy Signed-off-by: Andreas Gruenbacher [ gfs2_do_thaw() only takes 2 params ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 3b1303f97a3bc..e6f8be03190c4 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -759,9 +759,7 @@ static int gfs2_freeze_super(struct super_block *sb, enum freeze_holder who) break; } - error = gfs2_do_thaw(sdp, who); - if (error) - goto out; + (void)gfs2_do_thaw(sdp, who); if (error == -EBUSY) fs_err(sdp, "waiting for recovery before freeze\n");