- x86-64 compile warning fixes
- fix gateway LMC keyword conflict (2318)
- fix MDS lock inversions in getattr/reint paths (1844)
+ - fix a rare lock re-ordering bug, which caused deadlock (2322)
* miscellania
- allow configurable automake binary, for testing new versions
- small update to the lfs documentation
if (rc != 2) {
/* If either of the compat_queue()s returned 0, then we
- * have ASTs to send and must go onto the waiting list. */
- ldlm_resource_unlink_lock(lock);
- ldlm_resource_add_lock(res, &res->lr_waiting, lock);
+ * have ASTs to send and must go onto the waiting list.
+ *
+ * bug 2322: we used to unlink and re-add here, which was a
+ * terrible folly -- if we goto restart, we could get
+ * re-ordered! Causes deadlock, because ASTs aren't sent! */
+ if (list_empty(&lock->l_res_link))
+ ldlm_resource_add_lock(res, &res->lr_waiting, lock);
l_unlock(&res->lr_namespace->ns_lock);
rc = ldlm_run_ast_work(res->lr_namespace, &rpc_list);
l_lock(&res->lr_namespace->ns_lock);
if (rc != 2) {
/* If either of the compat_queue()s returned 0, then we
- * have ASTs to send and must go onto the waiting list. */
- ldlm_resource_unlink_lock(lock);
- ldlm_resource_add_lock(res, &res->lr_waiting, lock);
+ * have ASTs to send and must go onto the waiting list.
+ *
+ * bug 2322: we used to unlink and re-add here, which was a
+ * terrible folly -- if we goto restart, we could get
+ * re-ordered! Causes deadlock, because ASTs aren't sent! */
+ if (list_empty(&lock->l_res_link))
+ ldlm_resource_add_lock(res, &res->lr_waiting, lock);
l_unlock(&res->lr_namespace->ns_lock);
rc = ldlm_run_ast_work(res->lr_namespace, &rpc_list);
l_lock(&res->lr_namespace->ns_lock);