]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gfs2: add some missing log locking
authorAndreas Gruenbacher <agruenba@redhat.com>
Tue, 31 Mar 2026 04:13:42 +0000 (06:13 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 7 Apr 2026 20:20:00 +0000 (22:20 +0200)
commitfe2c8d051150b90b3ccb85f89e3b1d636cb88ec8
tree71c2ef3a9fd93a4894129222a7e4dec194601acb
parentf4e4c4e6acdc20a9065064dd164db52e2e0d44ad
gfs2: add some missing log locking

Function gfs2_logd() calls the log flushing functions gfs2_ail1_start(),
gfs2_ail1_wait(), and gfs2_ail1_empty() without holding sdp->sd_log_flush_lock,
but these functions require exclusion against concurrent transactions.

To fix that, add a non-locking __gfs2_log_flush() function.  Then, in
gfs2_logd(), take sdp->sd_log_flush_lock before calling the above mentioned log
flushing functions and __gfs2_log_flush().

Fixes: 5e4c7632aae1c ("gfs2: Issue revokes more intelligently")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c