]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: fix trans slab error when withdraw occurs inside log_flush
authorBob Peterson <rpeterso@redhat.com>
Tue, 9 Jun 2020 13:55:11 +0000 (09:55 -0400)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 30 Jun 2020 11:04:45 +0000 (13:04 +0200)
commitae90057c0f1553f167d7074a6d98efe84ef643bd
treef5724a1b5c134c35cbc5281fd1c0aee76f36b7a1
parent21cd8f4ac115077e051ddedd5b0015339514824a
gfs2: fix trans slab error when withdraw occurs inside log_flush

Log flush operations (gfs2_log_flush()) can target a specific transaction.
But if the function encounters errors (e.g. io errors) and withdraws,
the transaction was only freed it if was queued to one of the ail lists.
If the withdraw occurred before the transaction was queued to the ail1
list, function ail_drain never freed it. The result was:

BUG gfs2_trans: Objects remaining in gfs2_trans on __kmem_cache_shutdown()

This patch makes log_flush() add the targeted transaction to the ail1
list so that function ail_drain() will find and free it properly.

Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c