]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/dlm/dlmthread.c
tcp: remove tp->lost_out guard to make joining diff nicer
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / dlm / dlmthread.c
index 2b264c6ba039b72f7c103a05faecbea83082b4d0..4060bb328bc8a08c22bbd77c59835d757ebdcda5 100644 (file)
@@ -76,7 +76,7 @@ repeat:
                goto repeat;
        }
        remove_wait_queue(&res->wq, &wait);
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
 }
 
 int __dlm_lockres_has_locks(struct dlm_lock_resource *res)
@@ -176,12 +176,14 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,
             res->lockname.name, master);
 
        if (!master) {
+               /* drop spinlock...  retake below */
+               spin_unlock(&dlm->spinlock);
+
                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 */
                ret = dlm_drop_lockres_ref(dlm, res);
                if (ret < 0) {