gfs2: Sanitize kthread stopping
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 25 Aug 2023 09:18:38 +0000 (11:18 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Sep 2023 13:58:17 +0000 (15:58 +0200)
commitfe0690f0a6f190a9ec0736c01ddeba7a729cf30d
treebe579cb6b52703667dda859700f46ff23a97d794
parente4a8b5481c59a3f1252f595330c2d2cd038886b2
gfs2: Sanitize kthread stopping

Immediately stop the logd and quotad kernel threads when a filesystem
withdraw is detected: those threads aren't doing anything useful after a
withdraw.  (Depends on the extra logd and quotad task struct references
held since commit 7a109f383fa3 ("gfs2: Fix asynchronous thread
destruction").)

In addition, check for kthread_should_stop() in the wait condition in
gfs2_quotad() to stop immediately when kthread_stop() is called.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c
fs/gfs2/quota.c