Whamcloud - gitweb
LU-2675 build: assume __linux__ and __KERNEL__
[fs/lustre-release.git] / lustre / ldlm / ldlm_request.c
index 079edc8..486ec0c 100644 (file)
  */
 
 #define DEBUG_SUBSYSTEM S_LDLM
-#ifndef __KERNEL__
-#include <signal.h>
-#include <liblustre.h>
-#endif
 
 #include <lustre_dlm.h>
 #include <obd_class.h>
@@ -663,11 +659,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                         LDLM_DEBUG(lock,"client-side enqueue, new policy data");
         }
 
-        if ((*flags) & LDLM_FL_AST_SENT ||
-            /* Cancel extent locks as soon as possible on a liblustre client,
-             * because it cannot handle asynchronous ASTs robustly (see
-             * bug 7311). */
-            (LIBLUSTRE_CLIENT && type == LDLM_EXTENT)) {
+       if ((*flags) & LDLM_FL_AST_SENT) {
                 lock_res_and_lock(lock);
                lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST;
                 unlock_res_and_lock(lock);
@@ -971,14 +963,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                ptlrpc_request_set_replen(req);
         }
 
-        /*
-         * Liblustre client doesn't get extent locks, except for O_APPEND case
-         * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where
-         * [i_size, OBD_OBJECT_EOF] lock is taken.
-         */
-        LASSERT(ergo(LIBLUSTRE_CLIENT, einfo->ei_type != LDLM_EXTENT ||
-                     policy->l_extent.end == OBD_OBJECT_EOF));
-
         if (async) {
                 LASSERT(reqp != NULL);
                 RETURN(0);
@@ -1798,9 +1782,6 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
        int count, rc;
        ENTRY;
 
-#ifndef __KERNEL__
-       cancel_flags &= ~LCF_ASYNC; /* force to be sync in user space */
-#endif
        /* Just prepare the list of locks, do not actually cancel them yet.
         * Locks are cancelled later in a separate thread. */
        count = ldlm_prepare_lru_list(ns, &cancels, nr, 0, flags);