Andreas Gruenbacher 2cbd80642b gfs2: Fix freeze consistency check in gfs2_trans_add_meta
Function gfs2_trans_add_meta() checks for the SDF_FROZEN flag to make
sure that no buffers are added to a transaction while the filesystem is
frozen.  With the recent freeze/thaw rework, the SDF_FROZEN flag is
cleared after thaw_super() is called, which is sufficient for
serializing freeze/thaw.

However, other filesystem operations started after thaw_super() may now
be calling gfs2_trans_add_meta() before the SDF_FROZEN flag is cleared,
which will trigger the SDF_FROZEN check in gfs2_trans_add_meta().  Fix
that by checking the s_writers.frozen state instead.

In addition, make sure not to call gfs2_assert_withdraw() with the
sd_log_lock spin lock held.  Check for a withdrawn filesystem before
checking for a frozen filesystem, and don't pin/add buffers to the
current transaction in case of a failure in either case.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
2023-08-07 18:40:51 +02:00
..
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:27 +01:00
2023-07-04 11:45:16 -07:00
2023-06-06 18:35:06 +02:00
2023-04-18 14:40:12 +02:00
2022-08-06 14:44:49 -07:00
2023-07-04 11:45:16 -07:00
2023-03-27 14:42:16 +02:00
2023-07-04 11:45:16 -07:00
2023-07-03 22:30:48 +02:00
2023-07-03 22:30:26 +02:00
2023-07-03 22:25:02 +02:00
2023-07-03 22:30:48 +02:00
2023-07-03 22:30:26 +02:00
2023-03-06 09:57:12 +01:00