]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: bypass log flush if the journal is not live
authorBob Peterson <rpeterso@redhat.com>
Fri, 12 Mar 2021 13:47:47 +0000 (08:47 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 12 Mar 2021 14:52:48 +0000 (15:52 +0100)
commit4606a6d52bb6f697af9a993d1c856dd09c7eaac2
tree40f0bc6e3f5a69f345a2688fba1df0788df6ff6e
parenteaff6bc054d4db37f2fa649e99fa70d965c54ce8
gfs2: bypass log flush if the journal is not live

Patch aec0f01b583ca ("gfs2: Rework the log space allocation logic")
changed gfs2_log_flush to reserve a set of journal blocks in case no
transaction is active.  However, gfs2_log_flush also gets called in
cases where we don't have an active journal, for example, for spectator
mounts.  In that case, trying to reserve blocks would sleep forever, but
we want gfs2_log_flush to be a no-op instead.

Fixes: aec0f01b583ca ("gfs2: Rework the log space allocation logic")
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c