]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gfs2: Clean up SDF_JOURNAL_LIVE flag handling
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 Oct 2025 21:00:18 +0000 (21:00 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 26 Nov 2025 23:52:28 +0000 (23:52 +0000)
commit83348905e4137742c93bfd8104ce71c637121d38
treeb99f3a9ed3db3f7efcbc67ce84e31336db22a264
parent16c31979840399e6e5542f861c6fb18f9086f3c9
gfs2: Clean up SDF_JOURNAL_LIVE flag handling

Change do_withdraw() to clear the SDF_JOURNAL_LIVE flag under the log
flush lock.  In addition, change __gfs2_trans_begin() to check if the
filesystem is already known to be withdrawn using gfs2_withdrawn().
Then, once we are holding the log flush lock, check if the
SDF_JOURNAL_LIVE flag is still set.  This second check ensures that the
filesystem will remain live until the transaction is submitted.

With these changes, it is no longer useful to clear SDF_JOURNAL_LIVE in
gfs2_end_log_write() after calling gfs2_withdraw().

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/lops.c
fs/gfs2/trans.c
fs/gfs2/util.c