|
@@ -1460,6 +1460,18 @@ way_up_top:
|
|
|
|
|
|
/* take care of the easy cases up front */
|
|
/* take care of the easy cases up front */
|
|
spin_lock(&res->spinlock);
|
|
spin_lock(&res->spinlock);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Right after dlm spinlock was released, dlm_thread could have
|
|
|
|
+ * purged the lockres. Check if lockres got unhashed. If so
|
|
|
|
+ * start over.
|
|
|
|
+ */
|
|
|
|
+ if (hlist_unhashed(&res->hash_node)) {
|
|
|
|
+ spin_unlock(&res->spinlock);
|
|
|
|
+ dlm_lockres_put(res);
|
|
|
|
+ goto way_up_top;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (res->state & (DLM_LOCK_RES_RECOVERING|
|
|
if (res->state & (DLM_LOCK_RES_RECOVERING|
|
|
DLM_LOCK_RES_MIGRATING)) {
|
|
DLM_LOCK_RES_MIGRATING)) {
|
|
spin_unlock(&res->spinlock);
|
|
spin_unlock(&res->spinlock);
|