OSDN Git Service

Linux 4.2-rc2
[uclinux-h8/linux.git] / fs / gfs2 / glock.c
index 0fa8062..a38e38f 100644 (file)
@@ -1076,7 +1076,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
                    !test_bit(GLF_DEMOTE, &gl->gl_flags))
                        fast_path = 1;
        }
-       if (!test_bit(GLF_LFLUSH, &gl->gl_flags) && demote_ok(gl))
+       if (!test_bit(GLF_LFLUSH, &gl->gl_flags) && demote_ok(gl) &&
+           (glops->go_flags & GLOF_LRU))
                gfs2_glock_add_to_lru(gl);
 
        trace_gfs2_glock_queue(gh, 0);