dlmunlock() was not waiting for migration to complete before releasing locks
on locally mastered locks.
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>
                                               "with cookie %u:%llu!\n",
                                               dlm_get_lock_cookie_node(c),
                                               dlm_get_lock_cookie_seq(c));
+                               __dlm_print_one_lock_resource(res);
                                BUG();
                        }
                        BUG_ON(lock->ml.node != ml->node);
 
                goto leave;
        }
 
+       if (res->state & DLM_LOCK_RES_MIGRATING) {
+               status = DLM_MIGRATING;
+               goto leave;
+       }
 
        /* see above for what the spec says about
         * LKM_CANCEL and the lock queue state */