[Cluster-devel] [GFS2] Fix demotion criteria in clear_glock
Steven Whitehouse
swhiteho at redhat.com
Thu Feb 1 13:07:20 UTC 2007
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.
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6618c11..82bd64b 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -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);
More information about the Cluster-devel
mailing list