summaryrefslogtreecommitdiff
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2022-12-06 00:12:59 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2023-01-31 22:40:24 +0100
commit6c0246a96e08cd1b5036c34c52de99bd9dffbb48 (patch)
tree4d6075705c03e4e63740c0ee65fe35b7f8e6295d /fs/gfs2/glock.c
parent1c9001515e8adc0743c6ae0707dc6f3aac926d0e (diff)
gfs2: Cease delete work during unmount
Add a check to delete_work_func() so that it quits when it finds that the filesystem is deactivating. This speeds up the delete workqueue draining in gfs2_kill_sb(). In addition, make sure that iopen_go_callback() won't queue any new delete work while the filesystem is deactivating. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index b184375df9bd..5adc7d85dbf3 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1022,6 +1022,8 @@ static void delete_work_func(struct work_struct *work)
* step entirely.
*/
if (gfs2_try_evict(gl)) {
+ if (test_bit(SDF_DEACTIVATING, &sdp->sd_flags))
+ goto out;
if (gfs2_queue_verify_evict(gl))
return;
}
@@ -1033,6 +1035,7 @@ static void delete_work_func(struct work_struct *work)
GFS2_BLKST_UNLINKED);
if (IS_ERR(inode)) {
if (PTR_ERR(inode) == -EAGAIN &&
+ !test_bit(SDF_DEACTIVATING, &sdp->sd_flags) &&
gfs2_queue_verify_evict(gl))
return;
} else {