* [Cluster-devel] [PATCH] gfs2: Don't add glocks to the LRU while still in use
@ 2020-01-17 17:40 Andreas Gruenbacher
0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2020-01-17 17:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
Only add glocks to the LRU once they're no longer in use. They will outlive
the inode they are associated with if they are cached (not GL_NOCACHE) or if
they have some pending work attached.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/gfs2/glock.c | 2 +-
fs/gfs2/glock.h | 1 -
fs/gfs2/super.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index cabffdc126fd..2aa21bab8e1c 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -178,7 +178,7 @@ static int demote_ok(const struct gfs2_glock *gl)
}
-void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
+static void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
{
if (!(gl->gl_ops->go_flags & GLOF_LRU))
return;
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h
index b8adaf80e4c5..dc23cbf6ae7a 100644
--- a/fs/gfs2/glock.h
+++ b/fs/gfs2/glock.h
@@ -238,7 +238,6 @@ extern void gfs2_glock_complete(struct gfs2_glock *gl, int ret);
extern void gfs2_gl_hash_clear(struct gfs2_sbd *sdp);
extern void gfs2_glock_finish_truncate(struct gfs2_inode *ip);
extern void gfs2_glock_thaw(struct gfs2_sbd *sdp);
-extern void gfs2_glock_add_to_lru(struct gfs2_glock *gl);
extern void gfs2_glock_free(struct gfs2_glock *gl);
extern int __init gfs2_glock_init(void);
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 68cc7c291a81..2621d925812b 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1378,7 +1378,6 @@ static void gfs2_evict_inode(struct inode *inode)
gfs2_dir_hash_inval(ip);
glock_clear_object(ip->i_gl, ip);
wait_on_bit_io(&ip->i_flags, GIF_GLOP_PENDING, TASK_UNINTERRUPTIBLE);
- gfs2_glock_add_to_lru(ip->i_gl);
gfs2_glock_put_eventually(ip->i_gl);
ip->i_gl = NULL;
if (gfs2_holder_initialized(&ip->i_iopen_gh)) {
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-17 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17 17:40 [Cluster-devel] [PATCH] gfs2: Don't add glocks to the LRU while still in use Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).