]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ocfs2/dlm/dlmthread.c
ocfs2_dlm: Calling post handler function in assert master handler
[karo-tx-linux.git] / fs / ocfs2 / dlm / dlmthread.c
index 3b94e4dec351b8bbdfbe85137fb558aedbd5ef04..8ffa0916eb86fc1c111ae3964b156505f714c6e6 100644 (file)
@@ -176,6 +176,10 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,
             res->lockname.name, master);
 
        if (!master) {
+               spin_lock(&res->spinlock);
+               /* This ensures that clear refmap is sent after the set */
+               __dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG);
+               spin_unlock(&res->spinlock);
                /* drop spinlock to do messaging, retake below */
                spin_unlock(&dlm->spinlock);
                /* clear our bit from the master's refmap, ignore errors */