aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index fdb796c4f940..827136ee794c 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1314,6 +1314,10 @@ static int gfs2_shrink_glock_memory(int nr, gfp_t gfp_mask)
1314 list_del_init(&gl->gl_lru); 1314 list_del_init(&gl->gl_lru);
1315 atomic_dec(&lru_count); 1315 atomic_dec(&lru_count);
1316 1316
1317 /* Check if glock is about to be freed */
1318 if (atomic_read(&gl->gl_ref) == 0)
1319 continue;
1320
1317 /* Test for being demotable */ 1321 /* Test for being demotable */
1318 if (!test_and_set_bit(GLF_LOCK, &gl->gl_flags)) { 1322 if (!test_and_set_bit(GLF_LOCK, &gl->gl_flags)) {
1319 gfs2_glock_hold(gl); 1323 gfs2_glock_hold(gl);