- restart:
- rc = ldlm_plain_compat_queue(&res->lr_granted, lock, &rpc_list);
- rc += ldlm_plain_compat_queue(&res->lr_waiting, lock, &rpc_list);
-
- 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.
- *
- * 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);
- unlock_res(res);
- rc = ldlm_run_bl_ast_work(&rpc_list);
- lock_res(res);
- if (rc == -ERESTART)
- GOTO(restart, -ERESTART);
- *flags |= LDLM_FL_BLOCK_GRANTED;
- } else {
- ldlm_resource_unlink_lock(lock);
- ldlm_grant_lock(lock, NULL);
- }
- RETURN(0);
+ rc = ldlm_plain_compat_queue(&res->lr_granted, lock, work_list);
+ rc += ldlm_plain_compat_queue(&res->lr_waiting, lock, work_list);
+
+ if (rc == 2) {
+ ldlm_resource_unlink_lock(lock);
+ ldlm_grant_lock(lock, grant_work);
+ }
+
+ RETURN(LDLM_ITER_CONTINUE);
+}
+#endif /* HAVE_SERVER_SUPPORT */
+
+void ldlm_plain_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy,
+ union ldlm_policy_data *lpolicy)
+{
+ /* No policy for plain locks */
+}
+
+void ldlm_plain_policy_local_to_wire(const union ldlm_policy_data *lpolicy,
+ union ldlm_wire_policy_data *wpolicy)
+{
+ /* No policy for plain locks */