Skip to contentSkip to conversation

Fix demotion criteria in clear_glock

Cluster-devel Steven Whitehouse 1 participant 1 message Feb 1, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

Hi,

It seems that the drop locks callback was causing a problem by trying to demote locks which are still part of transactions. This patch means that we will now ignore locks which are still in use in a transaction when looking for demotion candidates.

Steve.

fs/gfs2/glock.c +1 -0
index 6618c11..82bd64b 100644
@@ -1791,6 +1791,7 @@ static void clear_glock(struct gfs2_glock *gl)
 
 	if (gfs2_glmutex_trylock(gl)) {
 		if (list_empty(&gl->gl_holders) &&
+		    !atomic_read(&gl->gl_ail_count) &&
 		    gl->gl_state != LM_ST_UNLOCKED)
 			handle_callback(gl, LM_ST_UNLOCKED);
 		gfs2_glmutex_unlock(gl);