diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2007-01-17 20:05:53 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-02-07 15:07:24 -0500 |
commit | 3b8118cffad224415c6f6f35abe7ca2a1d79c05a (patch) | |
tree | 2896f977f25b1c874472bdabb90d72c755f95573 /fs/ocfs2/dlm/dlmthread.c | |
parent | d74c9803a90d733f5fb7270475aa6d14b45796c6 (diff) |
ocfs2_dlm: Calling post handler function in assert master handler
This patch prevents the dlm from sending the clear refmap message
before the set refmap. We use the newly created post function handler
routine to accomplish the task.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmthread.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmthread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index 3b94e4dec351..8ffa0916eb86 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c | |||
@@ -176,6 +176,10 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm, | |||
176 | res->lockname.name, master); | 176 | res->lockname.name, master); |
177 | 177 | ||
178 | if (!master) { | 178 | if (!master) { |
179 | spin_lock(&res->spinlock); | ||
180 | /* This ensures that clear refmap is sent after the set */ | ||
181 | __dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG); | ||
182 | spin_unlock(&res->spinlock); | ||
179 | /* drop spinlock to do messaging, retake below */ | 183 | /* drop spinlock to do messaging, retake below */ |
180 | spin_unlock(&dlm->spinlock); | 184 | spin_unlock(&dlm->spinlock); |
181 | /* clear our bit from the master's refmap, ignore errors */ | 185 | /* clear our bit from the master's refmap, ignore errors */ |