]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gfs2: Fix unlinked inode cleanup
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 26 Aug 2024 18:06:21 +0000 (20:06 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 25 Sep 2024 15:11:49 +0000 (17:11 +0200)
commit7c6f714d88475ceae5342264858a641eafa19632
tree9023a70289b236a79c81a720fb063b928928baa7
parent160bc9555d8654464cbbd7bb1f6687048471d2f6
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>
fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/rgrp.c
fs/gfs2/super.c