diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2024-08-26 20:06:21 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2024-09-25 17:11:49 +0200 |
commit | 7c6f714d88475ceae5342264858a641eafa19632 (patch) | |
tree | 9023a70289b236a79c81a720fb063b928928baa7 /fs/gfs2/glock.h | |
parent | gfs2: Allow immediate GLF_VERIFY_DELETE work (diff) | |
download | linux-7c6f714d88475ceae5342264858a641eafa19632.tar.xz linux-7c6f714d88475ceae5342264858a641eafa19632.zip |
gfs2: Fix unlinked inode cleanup
Before commit f0e56edc2ec7 ("gfs2: Split the two kinds of glock "delete"
work"), function delete_work_func() was used to trigger the eviction of
in-memory inodes from remote as well as deleting unlinked inodes at a
later point. These two kinds of work were then split into two kinds of
work, and the two places in the code were deferred deletion of inodes is
required accidentally ended up queuing the wrong kind of work. This
caused unlinked inodes to be left behind, which could in the worst case
fill up filesystems and require a filesystem check to recover.
Fix that by queuing the right kind of work in try_rgrp_unlink() and
gfs2_drop_inode().
Fixes: f0e56edc2ec7 ("gfs2: Split the two kinds of glock "delete" work")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.h')
-rw-r--r-- | fs/gfs2/glock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index adf0091cc98f..63e101d448e9 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -245,6 +245,7 @@ static inline int gfs2_glock_nq_init(struct gfs2_glock *gl, void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state); void gfs2_glock_complete(struct gfs2_glock *gl, int ret); bool gfs2_queue_try_to_evict(struct gfs2_glock *gl); +bool gfs2_queue_verify_delete(struct gfs2_glock *gl, bool later); void gfs2_cancel_delete_work(struct gfs2_glock *gl); void gfs2_flush_delete_work(struct gfs2_sbd *sdp); void gfs2_gl_hash_clear(struct gfs2_sbd *sdp); |