diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index c38ab6c818983803d67815ac4a32b9302e48795d..1029340fc8ba46f1bba1a26a9bcbeb403e13b59e 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -150,6 +150,9 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl) static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) { + if (!(gl->gl_ops->go_flags & GLOF_LRU)) + return; + spin_lock(&lru_lock); if (!list_empty(&gl->gl_lru)) { list_del_init(&gl->gl_lru);