]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix BUG during unmount after file system withdraw
authorBob Peterson <rpeterso@redhat.com>
Fri, 24 Apr 2020 17:15:21 +0000 (12:15 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 May 2020 13:13:27 +0000 (15:13 +0200)
commite6b41bbd1189dd70cdc1086043ce6397452a7302
treea45dbd9b24fd504029709f8ae9450628c6d5e519
parent98e6ccf4db8aa3df5f9740542f5101cc984d181e
gfs2: Fix BUG during unmount after file system withdraw

Before this patch, when the logd daemon was forced to withdraw, it
would try to request its journal be recovered by another cluster node.
However, in single-user cases with lock_nolock, there are no other
nodes to recover the journal. Function signal_our_withdraw() was
recognizing the lock_nolock situation, but not until after it had
evicted its journal inode. Since the journal descriptor that points
to the inode was never removed from the master list, when the unmount
occurred, it did another iput on the evicted inode, which resulted in
a BUG_ON(inode->i_state & I_CLEAR).

This patch moves the check for this situation earlier in function
signal_our_withdraw(), which avoids the extra iput, so the unmount
may happen normally.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/util.c