diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2023-12-19 16:49:26 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2023-12-27 13:16:48 +0100 |
commit | e345b87b0b0444d1c644b0ea15cfb50e88f10b55 (patch) | |
tree | 33e0443704bcdc2bc1844d04200ca0bc994ac597 /arch/s390 | |
parent | 4e58543e7da4859c4ba61d15493e3522b6ad71fd (diff) | |
download | linux-e345b87b0b0444d1c644b0ea15cfb50e88f10b55.tar.gz linux-e345b87b0b0444d1c644b0ea15cfb50e88f10b55.tar.bz2 linux-e345b87b0b0444d1c644b0ea15cfb50e88f10b55.zip |
gfs2: Fix freeze consistency check in log_write_header
Functions gfs2_freeze_super() and gfs2_thaw_super() are using the
SDF_FROZEN flag to indicate when the filesystem is frozen, synchronized
by sd_freeze_mutex. However, this doesn't prevent writes from happening
between the point of calling thaw_super() and the point where the
SDF_FROZEN flag is cleared, so the following assert can trigger in
log_write_header():
gfs2_assert_withdraw(sdp, !test_bit(SDF_FROZEN, &sdp->sd_flags));
Fix that by checking for sb->s_writers.frozen != SB_FREEZE_COMPLETE in
log_write_header() instead. To make sure that the filesystem-specific
part of freezing happens before sb->s_writers.frozen is set to
SB_FREEZE_COMPLETE, move that code from gfs2_freeze_locally() into
gfs2_freeze_fs() and hook that up to the .freeze_fs operation.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'arch/s390')
0 files changed, 0 insertions, 0 deletions