Skip to content

Commit 4cfc7d5

Browse files
Alexey VelichayshiyAndreas Gruenbacher
authored andcommitted
gfs2: fix freeze error handling
After commit b77b4a4 ("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: b77b4a4 ("gfs2: Rework freeze / thaw logic") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Alexey Velichayshiy <a.velichayshiy@ispras.ru> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 2c5f4a5 commit 4cfc7d5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

fs/gfs2/super.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,7 @@ static int gfs2_freeze_super(struct super_block *sb, enum freeze_holder who,
749749
break;
750750
}
751751

752-
error = gfs2_do_thaw(sdp, who, freeze_owner);
753-
if (error)
754-
goto out;
752+
(void)gfs2_do_thaw(sdp, who, freeze_owner);
755753

756754
if (error == -EBUSY)
757755
fs_err(sdp, "waiting for recovery before freeze\n");

0 commit comments

Comments
 (0)