Whamcloud - gitweb
LU-1214 ldlm: splits server specific lock handling from client
[fs/lustre-release.git] / lustre / ldlm / ldlm_plain.c
index 5240a32..5b5d9e6 100644 (file)
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -51,6 +53,7 @@
 
 #include "ldlm_internal.h"
 
+#ifdef HAVE_SERVER_SUPPORT
 static inline int
 ldlm_plain_compat_queue(cfs_list_t *queue, struct ldlm_lock *req,
                         cfs_list_t *work_list)
@@ -147,7 +150,8 @@ int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq,
                 if (cfs_list_empty(&lock->l_res_link))
                         ldlm_resource_add_lock(res, &res->lr_waiting, lock);
                 unlock_res(res);
-                rc = ldlm_run_ast_work(&rpc_list, LDLM_WORK_BL_AST);
+                rc = ldlm_run_ast_work(ldlm_res_to_ns(res), &rpc_list,
+                                       LDLM_WORK_BL_AST);
                 lock_res(res);
                 if (rc == -ERESTART)
                         GOTO(restart, -ERESTART);
@@ -158,3 +162,16 @@ int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq,
         }
         RETURN(0);
 }
+#endif /* HAVE_SERVER_SUPPORT */
+
+void ldlm_plain_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,
+                                     ldlm_policy_data_t *lpolicy)
+{
+        /* No policy for plain locks */
+}
+
+void ldlm_plain_policy_local_to_wire(const ldlm_policy_data_t *lpolicy,
+                                     ldlm_wire_policy_data_t *wpolicy)
+{
+        /* No policy for plain locks */
+}