]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gfs2: Get rid of demote_ok checks
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 28 Mar 2024 19:46:25 +0000 (20:46 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 29 May 2024 13:34:55 +0000 (15:34 +0200)
commit713f8834389f4b34bc8b449412202543c8b32214
tree3fd04cf01fd5ef0343f6cbaaaf8a0f3660d913c8
parent3f4475bf24de31cce4a0c7d1372d4ab02b1f1407
gfs2: Get rid of demote_ok checks

The demote_ok glock operation is only still used to prevent the inode
glocks of the "jindex" and "rindex" directories from getting recycled
while they are still referenced by sdp->sd_jindex and sdp->sd_rindex.
However, the LRU walking code will no longer recycle glocks which are
referenced, so the demote_ok glock operation is obsolete and can be
removed.

Each of a glock's holders in the gl_holders list is holding a reference
on the glock, so when the list of holders isn't empty in demote_ok(),
the existing reference count check will already prevent the glock from
getting released.  This means that demote_ok() is obsolete as well.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Documentation/filesystems/gfs2-glocks.rst
fs/gfs2/glock.c
fs/gfs2/glops.c
fs/gfs2/incore.h