imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,33 +1,33 @@
 void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, umode_t mode, __u64 rdev, __u64 flags, const void *lmm, size_t lmmlen) {
   struct mdt_rec_create *rec;
   char *tmp;
   __u64 cr_flags;
-  CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_create));
+  BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_create));
   rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
   /* XXX do something about time, uid, gid */
   rec->cr_opcode = REINT_OPEN;
   rec->cr_fsuid = from_kuid(&init_user_ns, current_fsuid());
   rec->cr_fsgid = from_kgid(&init_user_ns, current_fsgid());
   rec->cr_cap = cfs_curproc_cap_pack();
   rec->cr_fid1 = op_data->op_fid1;
   rec->cr_fid2 = op_data->op_fid2;
   rec->cr_mode = mode;
   cr_flags = mds_pack_open_flags(flags);
   rec->cr_rdev = rdev;
   rec->cr_time = op_data->op_mod_time;
   rec->cr_suppgid1 = op_data->op_suppgids[0];
   rec->cr_suppgid2 = op_data->op_suppgids[1];
   rec->cr_bias = op_data->op_bias;
   rec->cr_umask = current_umask();
   rec->cr_old_handle = op_data->op_handle;
   if (op_data->op_name) {
     mdc_pack_name(req, &RMF_NAME, op_data->op_name, op_data->op_namelen);
     if (op_data->op_bias & MDS_CREATE_VOLATILE) cr_flags |= MDS_OPEN_VOLATILE;
   }
   if (lmm) {
     cr_flags |= MDS_OPEN_HAS_EA;
     tmp = req_capsule_client_get(&req->rq_pill, &RMF_EADATA);
     memcpy(tmp, lmm, lmmlen);
   }
   set_mrc_cr_flags(rec, cr_flags);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,26 +1,26 @@
 void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data, const char *old, size_t oldlen, const char *new, size_t newlen) {
   struct mdt_rec_rename *rec;
-  CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_rename));
+  BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_rename));
   rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
   /* XXX do something about time, uid, gid */
   rec->rn_opcode = op_data->op_cli_flags & CLI_MIGRATE ? REINT_MIGRATE : REINT_RENAME;
   rec->rn_opcode = REINT_RENAME;
   rec->rn_fsuid = op_data->op_fsuid;
   rec->rn_fsgid = op_data->op_fsgid;
   rec->rn_cap = op_data->op_cap;
   rec->rn_suppgid1 = op_data->op_suppgids[0];
   rec->rn_suppgid2 = op_data->op_suppgids[1];
   rec->rn_fid1 = op_data->op_fid1;
   rec->rn_fid2 = op_data->op_fid2;
   rec->rn_time = op_data->op_mod_time;
   rec->rn_mode = op_data->op_mode;
   rec->rn_bias = op_data->op_bias;
   mdc_pack_name(req, &RMF_NAME, old, oldlen);
   if (new) mdc_pack_name(req, &RMF_SYMTGT, new, newlen);
   if (op_data->op_cli_flags & CLI_MIGRATE && op_data->op_bias & MDS_RENAME_MIGRATE) {
     struct mdt_ioepoch *epoch;
     mdc_intent_close_pack(req, op_data);
     epoch = req_capsule_client_get(&req->rq_pill, &RMF_MDT_EPOCH);
     mdc_ioepoch_pack(epoch, op_data);
   }
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,17 +1,17 @@
 void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data, void *ea, size_t ealen) {
   struct mdt_rec_setattr *rec;
   struct lov_user_md *lum = NULL;
-  CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_setattr));
+  BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_setattr));
   rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
   mdc_setattr_pack_rec(rec, op_data);
   if (ealen == 0) return;
   lum = req_capsule_client_get(&req->rq_pill, &RMF_EADATA);
   if (!ea) { /* Remove LOV EA */
     lum->lmm_magic = cpu_to_le32(LOV_USER_MAGIC_V1);
     lum->lmm_stripe_size = 0;
     lum->lmm_stripe_count = 0;
     lum->lmm_stripe_offset = (typeof(lum->lmm_stripe_offset))(-1);
   } else {
     memcpy(lum, ea, ealen);
   }
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,17 +1,17 @@
 void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data) {
   struct mdt_rec_unlink *rec;
-  CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_unlink));
+  BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_unlink));
   rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
   rec->ul_opcode = op_data->op_cli_flags & CLI_RM_ENTRY ? REINT_RMENTRY : REINT_UNLINK;
   rec->ul_fsuid = op_data->op_fsuid;
   rec->ul_fsgid = op_data->op_fsgid;
   rec->ul_cap = op_data->op_cap;
   rec->ul_mode = op_data->op_mode;
   rec->ul_suppgid1 = op_data->op_suppgids[0];
   rec->ul_suppgid2 = -1;
   rec->ul_fid1 = op_data->op_fid1;
   rec->ul_fid2 = op_data->op_fid2;
   rec->ul_time = op_data->op_mod_time;
   rec->ul_bias = op_data->op_bias;
   mdc_pack_name(req, &RMF_NAME, op_data->op_name, op_data->op_namelen);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,38 +1,38 @@
 int mdc_intent_getattr_async(struct obd_export *exp, struct md_enqueue_info *minfo, struct ldlm_enqueue_info *einfo) {
   struct md_op_data *op_data = &minfo->mi_data;
   struct lookup_intent *it = &minfo->mi_it;
   struct ptlrpc_request *req;
   struct mdc_getattr_args *ga;
   struct obd_device *obddev = class_exp2obd(exp);
   struct ldlm_res_id res_id;
   /*XXX: Both MDS_INODELOCK_LOOKUP and MDS_INODELOCK_UPDATE are needed
    *     for statahead currently. Consider CMD in future, such two bits
    *     maybe managed by different MDS, should be adjusted then.
    */
   union ldlm_policy_data policy = {.l_inodebits = {MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE}};
   int rc = 0;
   __u64 flags = LDLM_FL_HAS_INTENT;
   CDEBUG(D_DLMTRACE, "name: %.*s in inode " DFID ", intent: %s flags %#Lo\n", (int)op_data->op_namelen, op_data->op_name, PFID(&op_data->op_fid1), ldlm_it2str(it->it_op), it->it_flags);
   fid_build_reg_res_name(&op_data->op_fid1, &res_id);
   req = mdc_intent_getattr_pack(exp, it, op_data);
   if (IS_ERR(req)) return PTR_ERR(req);
   rc = obd_get_request_slot(&obddev->u.cli);
   if (rc != 0) {
     ptlrpc_req_finished(req);
     return rc;
   }
   rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, &policy, &flags, NULL, 0, LVB_T_NONE, &minfo->mi_lockh, 1);
   if (rc < 0) {
     obd_put_request_slot(&obddev->u.cli);
     ptlrpc_req_finished(req);
     return rc;
   }
-  CLASSERT(sizeof(*ga) <= sizeof(req->rq_async_args));
+  BUILD_BUG_ON(sizeof(*ga) > sizeof(req->rq_async_args));
   ga = ptlrpc_req_async_args(req);
   ga->ga_exp = exp;
   ga->ga_minfo = minfo;
   ga->ga_einfo = einfo;
   req->rq_interpret_reply = mdc_intent_getattr_async_interpret;
   ptlrpcd_add_req(req);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,73 +1,73 @@
 static int mdc_xattr_common(struct obd_export *exp, const struct req_format *fmt, const struct lu_fid *fid, int opcode, u64 valid, const char *xattr_name, const char *input, int input_size, int output_size, int flags, __u32 suppgid, struct ptlrpc_request **request) {
   struct ptlrpc_request *req;
   int xattr_namelen = 0;
   char *tmp;
   int rc;
   *request = NULL;
   req = ptlrpc_request_alloc(class_exp2cliimp(exp), fmt);
   if (!req) return -ENOMEM;
   if (xattr_name) {
     xattr_namelen = strlen(xattr_name) + 1;
     req_capsule_set_size(&req->rq_pill, &RMF_NAME, RCL_CLIENT, xattr_namelen);
   }
   if (input_size) {
     LASSERT(input);
     req_capsule_set_size(&req->rq_pill, &RMF_EADATA, RCL_CLIENT, input_size);
   }
   /* Flush local XATTR locks to get rid of a possible cancel RPC */
   if (opcode == MDS_REINT && fid_is_sane(fid) && exp->exp_connect_data.ocd_ibits_known & MDS_INODELOCK_XATTR) {
     LIST_HEAD(cancels);
     int count;
     /* Without that packing would fail */
     if (input_size == 0) req_capsule_set_size(&req->rq_pill, &RMF_EADATA, RCL_CLIENT, 0);
     count = mdc_resource_get_unused(exp, fid, &cancels, LCK_EX, MDS_INODELOCK_XATTR);
     rc = mdc_prep_elc_req(exp, req, MDS_REINT, &cancels, count);
     if (rc) {
       ptlrpc_request_free(req);
       return rc;
     }
   } else {
     rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, opcode);
     if (rc) {
       ptlrpc_request_free(req);
       return rc;
     }
   }
   if (opcode == MDS_REINT) {
     struct mdt_rec_setxattr *rec;
-    CLASSERT(sizeof(struct mdt_rec_setxattr) == sizeof(struct mdt_rec_reint));
+    BUILD_BUG_ON(sizeof(struct mdt_rec_setxattr) != sizeof(struct mdt_rec_reint));
     rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
     rec->sx_opcode = REINT_SETXATTR;
     rec->sx_fsuid = from_kuid(&init_user_ns, current_fsuid());
     rec->sx_fsgid = from_kgid(&init_user_ns, current_fsgid());
     rec->sx_cap = cfs_curproc_cap_pack();
     rec->sx_suppgid1 = suppgid;
     rec->sx_suppgid2 = -1;
     rec->sx_fid = *fid;
     rec->sx_valid = valid | OBD_MD_FLCTIME;
     rec->sx_time = ktime_get_real_seconds();
     rec->sx_size = output_size;
     rec->sx_flags = flags;
   } else {
     mdc_pack_body(req, fid, valid, output_size, suppgid, flags);
   }
   if (xattr_name) {
     tmp = req_capsule_client_get(&req->rq_pill, &RMF_NAME);
     memcpy(tmp, xattr_name, xattr_namelen);
   }
   if (input_size) {
     tmp = req_capsule_client_get(&req->rq_pill, &RMF_EADATA);
     memcpy(tmp, input, input_size);
   }
   if (req_capsule_has_field(&req->rq_pill, &RMF_EADATA, RCL_SERVER)) req_capsule_set_size(&req->rq_pill, &RMF_EADATA, RCL_SERVER, output_size);
   ptlrpc_request_set_replen(req);
   /* make rpc */
   if (opcode == MDS_REINT) mdc_get_mod_rpc_slot(req, NULL);
   rc = ptlrpc_queue_wait(req);
   if (opcode == MDS_REINT) mdc_put_mod_rpc_slot(req, NULL);
   if (rc)
     ptlrpc_req_finished(req);
   else
     *request = req;
   return rc;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,12 +1,12 @@
 int lnet_fault_init(void) {
-  CLASSERT(LNET_PUT_BIT == 1 << LNET_MSG_PUT);
-  CLASSERT(LNET_ACK_BIT == 1 << LNET_MSG_ACK);
-  CLASSERT(LNET_GET_BIT == 1 << LNET_MSG_GET);
-  CLASSERT(LNET_REPLY_BIT == 1 << LNET_MSG_REPLY);
+  BUILD_BUG_ON(LNET_PUT_BIT != 1 << LNET_MSG_PUT);
+  BUILD_BUG_ON(LNET_ACK_BIT != 1 << LNET_MSG_ACK);
+  BUILD_BUG_ON(LNET_GET_BIT != 1 << LNET_MSG_GET);
+  BUILD_BUG_ON(LNET_REPLY_BIT != 1 << LNET_MSG_REPLY);
   mutex_init(&delay_dd.dd_mutex);
   spin_lock_init(&delay_dd.dd_lock);
   init_waitqueue_head(&delay_dd.dd_waitq);
   init_waitqueue_head(&delay_dd.dd_ctl_waitq);
   INIT_LIST_HEAD(&delay_dd.dd_sched_rules);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,34 +1,34 @@
 static void kiblnd_map_tx_pool(struct kib_tx_pool *tpo) {
   struct kib_pages *txpgs = tpo->tpo_tx_pages;
   struct kib_pool *pool = &tpo->tpo_pool;
   struct kib_net *net = pool->po_owner->ps_net;
   struct kib_dev *dev;
   struct page *page;
   struct kib_tx *tx;
   int page_offset;
   int ipage;
   int i;
   LASSERT(net);
   dev = net->ibn_dev;
   /* pre-mapped messages are not bigger than 1 page */
-  CLASSERT(IBLND_MSG_SIZE <= PAGE_SIZE);
+  BUILD_BUG_ON(IBLND_MSG_SIZE > PAGE_SIZE);
   /* No fancy arithmetic when we do the buffer calculations */
-  CLASSERT(!(PAGE_SIZE % IBLND_MSG_SIZE));
+  BUILD_BUG_ON(PAGE_SIZE % IBLND_MSG_SIZE);
   tpo->tpo_hdev = kiblnd_current_hdev(dev);
   for (ipage = page_offset = i = 0; i < pool->po_size; i++) {
     page = txpgs->ibp_pages[ipage];
     tx = &tpo->tpo_tx_descs[i];
     tx->tx_msg = (struct kib_msg *)(((char *)page_address(page)) + page_offset);
     tx->tx_msgaddr = kiblnd_dma_map_single(tpo->tpo_hdev->ibh_ibdev, tx->tx_msg, IBLND_MSG_SIZE, DMA_TO_DEVICE);
     LASSERT(!kiblnd_dma_mapping_error(tpo->tpo_hdev->ibh_ibdev, tx->tx_msgaddr));
     KIBLND_UNMAP_ADDR_SET(tx, tx_msgunmap, tx->tx_msgaddr);
     list_add(&tx->tx_list, &pool->po_free_list);
     page_offset += IBLND_MSG_SIZE;
     LASSERT(page_offset <= PAGE_SIZE);
     if (page_offset == PAGE_SIZE) {
       page_offset = 0;
       ipage++;
       LASSERT(ipage <= txpgs->ibp_npages);
     }
   }
 }<sep>@@
identifier e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);

@@
expression e;
@@
-               CLASSERT(!(e));
+               BUILD_BUG_ON(e);
--- initial
+++ final
@@ -1,62 +1,62 @@
 static int kiblnd_startup(lnet_ni_t *ni) {
   char *ifname;
   struct kib_dev *ibdev = NULL;
   struct kib_net *net;
   struct timespec64 tv;
   unsigned long flags;
   int rc;
   int newdev;
   LASSERT(ni->ni_lnd == &the_o2iblnd);
   if (kiblnd_data.kib_init == IBLND_INIT_NOTHING) {
     rc = kiblnd_base_startup();
     if (rc) return rc;
   }
   LIBCFS_ALLOC(net, sizeof(*net));
   ni->ni_data = net;
   if (!net) goto net_failed;
   ktime_get_real_ts64(&tv);
   net->ibn_incarnation = tv.tv_sec * USEC_PER_SEC + tv.tv_nsec / NSEC_PER_USEC;
   rc = kiblnd_tunables_setup(ni);
   if (rc) goto net_failed;
   if (ni->ni_interfaces[0]) {
     /* Use the IPoIB interface specified in 'networks=' */
-    CLASSERT(LNET_MAX_INTERFACES > 1);
+    BUILD_BUG_ON(LNET_MAX_INTERFACES <= 1);
     if (ni->ni_interfaces[1]) {
       CERROR("Multiple interfaces not supported\n");
       goto failed;
     }
     ifname = ni->ni_interfaces[0];
   } else {
     ifname = *kiblnd_tunables.kib_default_ipif;
   }
   if (strlen(ifname) >= sizeof(ibdev->ibd_ifname)) {
     CERROR("IPoIB interface name too long: %s\n", ifname);
     goto failed;
   }
   ibdev = kiblnd_dev_search(ifname);
   newdev = !ibdev;
   /* hmm...create kib_dev even for alias */
   if (!ibdev || strcmp(&ibdev->ibd_ifname[0], ifname)) ibdev = kiblnd_create_dev(ifname);
   if (!ibdev) goto failed;
   net->ibn_dev = ibdev;
   ni->ni_nid = LNET_MKNID(LNET_NIDNET(ni->ni_nid), ibdev->ibd_ifip);
   rc = kiblnd_dev_start_threads(ibdev, newdev, ni->ni_cpts, ni->ni_ncpts);
   if (rc) goto failed;
   rc = kiblnd_net_init_pools(net, ni, ni->ni_cpts, ni->ni_ncpts);
   if (rc) {
     CERROR("Failed to initialize NI pools: %d\n", rc);
     goto failed;
   }
   write_lock_irqsave(&kiblnd_data.kib_global_lock, flags);
   ibdev->ibd_nnets++;
   list_add_tail(&net->ibn_list, &ibdev->ibd_nets);
   write_unlock_irqrestore(&kiblnd_data.kib_global_lock, flags);
   net->ibn_init = IBLND_INIT_ALL;
   return 0;
 failed:
   if (!net->ibn_dev && ibdev) kiblnd_destroy_dev(ibdev);
 net_failed:
   kiblnd_shutdown(ni);
   CDEBUG(D_NET, "kiblnd_startup failed\n");
   return -ENETDOWN;
 }<sep>@@
identifier i;
expression e1;
@@
-               CLASSERT(e1 < i);
+               BUILD_BUG_ON(i <= e1);
--- initial
+++ final
@@ -1,88 +1,88 @@
 int kiblnd_unpack_msg(struct kib_msg *msg, int nob) {
   const int hdr_size = offsetof(struct kib_msg, ibm_u);
   __u32 msg_cksum;
   __u16 version;
   int msg_nob;
   int flip;
   /* 6 bytes are enough to have received magic + version */
   if (nob < 6) {
     CERROR("Short message: %d\n", nob);
     return -EPROTO;
   }
   if (msg->ibm_magic == IBLND_MSG_MAGIC) {
     flip = 0;
   } else if (msg->ibm_magic == __swab32(IBLND_MSG_MAGIC)) {
     flip = 1;
   } else {
     CERROR("Bad magic: %08x\n", msg->ibm_magic);
     return -EPROTO;
   }
   version = flip ? __swab16(msg->ibm_version) : msg->ibm_version;
   if (version != IBLND_MSG_VERSION && version != IBLND_MSG_VERSION_1) {
     CERROR("Bad version: %x\n", version);
     return -EPROTO;
   }
   if (nob < hdr_size) {
     CERROR("Short message: %d\n", nob);
     return -EPROTO;
   }
   msg_nob = flip ? __swab32(msg->ibm_nob) : msg->ibm_nob;
   if (msg_nob > nob) {
     CERROR("Short message: got %d, wanted %d\n", nob, msg_nob);
     return -EPROTO;
   }
   /*
    * checksum must be computed with ibm_cksum zero and BEFORE anything
    * gets flipped
    */
   msg_cksum = flip ? __swab32(msg->ibm_cksum) : msg->ibm_cksum;
   msg->ibm_cksum = 0;
   if (msg_cksum && msg_cksum != kiblnd_cksum(msg, msg_nob)) {
     CERROR("Bad checksum\n");
     return -EPROTO;
   }
   msg->ibm_cksum = msg_cksum;
   if (flip) {
     /* leave magic unflipped as a clue to peer endianness */
     msg->ibm_version = version;
-    CLASSERT(sizeof(msg->ibm_type) == 1);
-    CLASSERT(sizeof(msg->ibm_credits) == 1);
+    BUILD_BUG_ON(sizeof(msg->ibm_type) != 1);
+    BUILD_BUG_ON(sizeof(msg->ibm_credits) != 1);
     msg->ibm_nob = msg_nob;
     __swab64s(&msg->ibm_srcnid);
     __swab64s(&msg->ibm_srcstamp);
     __swab64s(&msg->ibm_dstnid);
     __swab64s(&msg->ibm_dststamp);
   }
   if (msg->ibm_srcnid == LNET_NID_ANY) {
     CERROR("Bad src nid: %s\n", libcfs_nid2str(msg->ibm_srcnid));
     return -EPROTO;
   }
   if (msg_nob < kiblnd_msgtype2size(msg->ibm_type)) {
     CERROR("Short %s: %d(%d)\n", kiblnd_msgtype2str(msg->ibm_type), msg_nob, kiblnd_msgtype2size(msg->ibm_type));
     return -EPROTO;
   }
   switch (msg->ibm_type) {
   default: CERROR("Unknown message type %x\n", msg->ibm_type); return -EPROTO;
   case IBLND_MSG_NOOP:
   case IBLND_MSG_IMMEDIATE:
   case IBLND_MSG_PUT_REQ: break;
   case IBLND_MSG_PUT_ACK:
   case IBLND_MSG_GET_REQ:
     if (kiblnd_unpack_rd(msg, flip)) return -EPROTO;
     break;
   case IBLND_MSG_PUT_NAK:
   case IBLND_MSG_PUT_DONE:
   case IBLND_MSG_GET_DONE:
     if (flip) __swab32s(&msg->ibm_u.completion.ibcm_status);
     break;
   case IBLND_MSG_CONNREQ:
   case IBLND_MSG_CONNACK:
     if (flip) {
       __swab16s(&msg->ibm_u.connparams.ibcp_queue_depth);
       __swab16s(&msg->ibm_u.connparams.ibcp_max_frags);
       __swab32s(&msg->ibm_u.connparams.ibcp_max_msg_size);
     }
     break;
   }
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,8 +1,8 @@
 static int __init ko2iblnd_init(void) {
-  CLASSERT(sizeof(struct kib_msg) <= IBLND_MSG_SIZE);
-  CLASSERT(offsetof(struct kib_msg, ibm_u.get.ibgm_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]) <= IBLND_MSG_SIZE);
-  CLASSERT(offsetof(struct kib_msg, ibm_u.putack.ibpam_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]) <= IBLND_MSG_SIZE);
+  BUILD_BUG_ON(IBLND_MSG_SIZE < sizeof(struct kib_msg));
+  BUILD_BUG_ON(IBLND_MSG_SIZE < offsetof(struct kib_msg, ibm_u.get.ibgm_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]));
+  BUILD_BUG_ON(IBLND_MSG_SIZE < offsetof(struct kib_msg, ibm_u.putack.ibpam_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]));
   kiblnd_tunables_init();
   lnet_register_lnd(&the_o2iblnd);
   return 0;
 }<sep>@@
identifier i;
expression e1;
@@
-               CLASSERT(e1 <= i);
+               BUILD_BUG_ON(i < e1);
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int osc_io_data_version_start(const struct lu_env *env, const struct cl_io_slice *slice) {
   struct cl_data_version_io *dv = &slice->cis_io->u.ci_data_version;
   struct osc_io *oio = cl2osc_io(env, slice);
   struct osc_async_cbargs *cbargs = &oio->oi_cbarg;
   struct osc_object *obj = cl2osc(slice->cis_obj);
   struct obd_export *exp = osc_export(obj);
   struct lov_oinfo *loi = obj->oo_oinfo;
   struct osc_data_version_args *dva;
   struct obdo *oa = &oio->oi_oa;
   struct ptlrpc_request *req;
   struct ost_body *body;
   int rc;
   memset(oa, 0, sizeof(*oa));
   oa->o_oi = loi->loi_oi;
   oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
   if (dv->dv_flags & (LL_DV_RD_FLUSH | LL_DV_WR_FLUSH)) {
     oa->o_valid |= OBD_MD_FLFLAGS;
     oa->o_flags |= OBD_FL_SRVLOCK;
     if (dv->dv_flags & LL_DV_WR_FLUSH) oa->o_flags |= OBD_FL_FLUSH;
   }
   init_completion(&cbargs->opc_sync);
   req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_OST_GETATTR);
   if (!req) return -ENOMEM;
   rc = ptlrpc_request_pack(req, LUSTRE_OST_VERSION, OST_GETATTR);
   if (rc < 0) {
     ptlrpc_request_free(req);
     return rc;
   }
   body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
   lustre_set_wire_obdo(&req->rq_import->imp_connect_data, &body->oa, oa);
   ptlrpc_request_set_replen(req);
   req->rq_interpret_reply = osc_data_version_interpret;
-  CLASSERT(sizeof(*dva) <= sizeof(req->rq_async_args));
+  BUILD_BUG_ON(sizeof(*dva) > sizeof(req->rq_async_args));
   dva = ptlrpc_req_async_args(req);
   dva->dva_oio = oio;
   ptlrpcd_add_req(req);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,30 +1,30 @@
 int osc_punch_base(struct obd_export *exp, struct obdo *oa, obd_enqueue_update_f upcall, void *cookie, struct ptlrpc_request_set *rqset) {
   struct ptlrpc_request *req;
   struct osc_setattr_args *sa;
   struct ost_body *body;
   int rc;
   req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_OST_PUNCH);
   if (!req) return -ENOMEM;
   rc = ptlrpc_request_pack(req, LUSTRE_OST_VERSION, OST_PUNCH);
   if (rc) {
     ptlrpc_request_free(req);
     return rc;
   }
   req->rq_request_portal = OST_IO_PORTAL; /* bug 7198 */
   ptlrpc_at_set_req_timeout(req);
   body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
   LASSERT(body);
   lustre_set_wire_obdo(&req->rq_import->imp_connect_data, &body->oa, oa);
   ptlrpc_request_set_replen(req);
   req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_setattr_interpret;
-  CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
+  BUILD_BUG_ON(sizeof(*sa) > sizeof(req->rq_async_args));
   sa = ptlrpc_req_async_args(req);
   sa->sa_oa = oa;
   sa->sa_upcall = upcall;
   sa->sa_cookie = cookie;
   if (rqset == PTLRPCD_SET)
     ptlrpcd_add_req(req);
   else
     ptlrpc_set_add_req(rqset, req);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,31 +1,31 @@
 int osc_setattr_async(struct obd_export *exp, struct obdo *oa, obd_enqueue_update_f upcall, void *cookie, struct ptlrpc_request_set *rqset) {
   struct ptlrpc_request *req;
   struct osc_setattr_args *sa;
   int rc;
   req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_OST_SETATTR);
   if (!req) return -ENOMEM;
   rc = ptlrpc_request_pack(req, LUSTRE_OST_VERSION, OST_SETATTR);
   if (rc) {
     ptlrpc_request_free(req);
     return rc;
   }
   osc_pack_req_body(req, oa);
   ptlrpc_request_set_replen(req);
   /* do mds to ost setattr asynchronously */
   if (!rqset) {
     /* Do not wait for response. */
     ptlrpcd_add_req(req);
   } else {
     req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_setattr_interpret;
-    CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
+    BUILD_BUG_ON(sizeof(*sa) > sizeof(req->rq_async_args));
     sa = ptlrpc_req_async_args(req);
     sa->sa_oa = oa;
     sa->sa_upcall = upcall;
     sa->sa_cookie = cookie;
     if (rqset == PTLRPCD_SET)
       ptlrpcd_add_req(req);
     else
       ptlrpc_set_add_req(rqset, req);
   }
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);