--- initial
+++ final
@@ -1,115 +1,115 @@
 int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, __u64 *flags, union ldlm_policy_data *policy, struct ost_lvb *lvb, int kms_valid, osc_enqueue_upcall_f upcall, void *cookie, struct ldlm_enqueue_info *einfo, struct ptlrpc_request_set *rqset, int async, int agl) {
   struct obd_device *obd = exp->exp_obd;
   struct lustre_handle lockh = {0};
   struct ptlrpc_request *req = NULL;
   int intent = *flags & LDLM_FL_HAS_INTENT;
   __u64 match_flags = *flags;
   enum ldlm_mode mode;
   int rc;
   /* Filesystem lock extents are extended to page boundaries so that
    * dealing with the page cache is a little smoother.
    */
   policy->l_extent.start -= policy->l_extent.start & ~PAGE_MASK;
   policy->l_extent.end |= ~PAGE_MASK;
   /*
    * kms is not valid when either object is completely fresh (so that no
    * locks are cached), or object was evicted. In the latter case cached
    * lock cannot be used, because it would prime inode state with
    * potentially stale LVB.
    */
   if (!kms_valid) goto no_match;
   /* Next, search for already existing extent locks that will cover us */
   /* If we're trying to read, we also search for an existing PW lock.  The
    * VFS and page cache already protect us locally, so lots of readers/
    * writers can share a single PW lock.
    *
    * There are problems with conversion deadlocks, so instead of
    * converting a read lock to a write lock, we'll just enqueue a new
    * one.
    *
    * At some point we should cancel the read lock instead of making them
    * send us a blocking callback, but there are problems with canceling
    * locks out from other users right now, too.
    */
   mode = einfo->ei_mode;
   if (einfo->ei_mode == LCK_PR) mode |= LCK_PW;
   if (agl == 0) match_flags |= LDLM_FL_LVB_READY;
   if (intent != 0) match_flags |= LDLM_FL_BLOCK_GRANTED;
   mode = ldlm_lock_match(obd->obd_namespace, match_flags, res_id, einfo->ei_type, policy, mode, &lockh, 0);
   if (mode) {
     struct ldlm_lock *matched;
     if (*flags & LDLM_FL_TEST_LOCK) return ELDLM_OK;
     matched = ldlm_handle2lock(&lockh);
     if (agl) {
       /* AGL enqueues DLM locks speculatively. Therefore if
        * it already exists a DLM lock, it wll just inform the
        * caller to cancel the AGL process for this stripe.
        */
       ldlm_lock_decref(&lockh, mode);
       LDLM_LOCK_PUT(matched);
       return -ECANCELED;
     } else if (osc_set_lock_data(matched, einfo->ei_cbdata)) {
       *flags |= LDLM_FL_LVB_READY;
       /* We already have a lock, and it's referenced. */
       (*upcall)(cookie, &lockh, ELDLM_LOCK_MATCHED);
       ldlm_lock_decref(&lockh, mode);
       LDLM_LOCK_PUT(matched);
       return ELDLM_OK;
     } else {
       ldlm_lock_decref(&lockh, mode);
       LDLM_LOCK_PUT(matched);
     }
   }
 no_match:
   if (*flags & LDLM_FL_TEST_LOCK) return -ENOLCK;
   if (intent) {
     req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_LDLM_ENQUEUE_LVB);
     if (!req) return -ENOMEM;
     rc = ldlm_prep_enqueue_req(exp, req, NULL, 0);
     if (rc) {
       ptlrpc_request_free(req);
       return rc;
     }
     req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER, sizeof(*lvb));
     ptlrpc_request_set_replen(req);
   }
   /* users of osc_enqueue() can pass this flag for ldlm_lock_match() */
   *flags &= ~LDLM_FL_BLOCK_GRANTED;
   rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, policy, flags, lvb, sizeof(*lvb), LVB_T_OST, &lockh, async);
   if (async) {
     if (!rc) {
       struct osc_enqueue_args *aa;
-      CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
+      BUILD_BUG_ON(sizeof(*aa) > sizeof(req->rq_async_args));
       aa = ptlrpc_req_async_args(req);
       aa->oa_exp = exp;
       aa->oa_mode = einfo->ei_mode;
       aa->oa_type = einfo->ei_type;
       lustre_handle_copy(&aa->oa_lockh, &lockh);
       aa->oa_upcall = upcall;
       aa->oa_cookie = cookie;
       aa->oa_agl = !!agl;
       if (!agl) {
         aa->oa_flags = flags;
         aa->oa_lvb = lvb;
       } else {
         /* AGL is essentially to enqueue an DLM lock
          * in advance, so we don't care about the
          * result of AGL enqueue.
          */
         aa->oa_lvb = NULL;
         aa->oa_flags = NULL;
       }
       req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_enqueue_interpret;
       if (rqset == PTLRPCD_SET)
         ptlrpcd_add_req(req);
       else
         ptlrpc_set_add_req(rqset, req);
     } else if (intent) {
       ptlrpc_req_finished(req);
     }
     return rc;
   }
   rc = osc_enqueue_fini(req, upcall, cookie, &lockh, einfo->ei_mode, flags, agl, rc);
   if (intent) ptlrpc_req_finished(req);
   return rc;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);