From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Thu, 01 Feb 2007 13:07:20 +0000 Subject: [Cluster-devel] [GFS2] Fix demotion criteria in clear_glock Message-ID: <1170335240.11001.175.camel@quoit.chygwyn.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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);