diff --git a/fs/lustre/osc/osc_cache.c b/fs/lustre/osc/osc_cache.c
index 37624a7a99d6..41a07e5d1d07 100644
--- a/fs/lustre/osc/osc_cache.c
+++ b/fs/lustre/osc/osc_cache.c
@@ -1638,7 +1638,7 @@ static int osc_enter_cache(const struct lu_env *env, struct client_obd *cli,
 	/* force the caller to try sync io.  this can jump the list
 	 * of queued writes and create a discontiguous rpc stream
 	 */
-	if (OBD_FAIL_CHECK(OBD_FAIL_OSC_NO_GRANT) ||
+	if (CFS_FAIL_CHECK(OBD_FAIL_OSC_NO_GRANT) ||
 	    !cli->cl_dirty_max_pages || cli->cl_ar.ar_force_sync ||
 	    loi->loi_ar.ar_force_sync) {
 		OSC_DUMP_GRANT(D_CACHE, cli, "forced sync i/o\n");
@@ -3196,7 +3196,7 @@ bool osc_page_gang_lookup(const struct lu_env *env, struct cl_io *io,
 		if (!res)
 			break;
 
-		OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SLOW_PAGE_EVICT,
+		CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_SLOW_PAGE_EVICT,
 				 cfs_fail_val ?: 20);
 
 		if (io->ci_type == CIT_MISC &&
diff --git a/fs/lustre/osc/osc_io.c b/fs/lustre/osc/osc_io.c
index 71bfe60ad40a..900edf8b9a41 100644
--- a/fs/lustre/osc/osc_io.c
+++ b/fs/lustre/osc/osc_io.c
@@ -899,7 +899,7 @@ int osc_io_write_start(const struct lu_env *env,
 	struct cl_attr *attr = &osc_env_info(env)->oti_attr;
 	int rc = 0;
 
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_SETTIME, 1);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_SETTIME, 1);
 	cl_object_attr_lock(obj);
 	attr->cat_ctime = ktime_get_real_seconds();
 	attr->cat_mtime = attr->cat_ctime;
diff --git a/fs/lustre/osc/osc_lock.c b/fs/lustre/osc/osc_lock.c
index 181edf286739..3eac1d44fb2d 100644
--- a/fs/lustre/osc/osc_lock.c
+++ b/fs/lustre/osc/osc_lock.c
@@ -412,7 +412,7 @@ static int __osc_dlm_blocking_ast(const struct lu_env *env,
 
 	unlock_res_and_lock(dlmlock);
 
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_CANCEL, 5);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_CANCEL, 5);
 
 	/* if l_ast_data is NULL, the dlmlock was enqueued by AGL or
 	 * the object has been destroyed.
@@ -586,7 +586,7 @@ int osc_ldlm_glimpse_ast(struct ldlm_lock *dlmlock, void *data)
 		dlmlock = NULL;
 
 		if (!obj && res->lr_type == LDLM_EXTENT) {
-			if (OBD_FAIL_CHECK(OBD_FAIL_OSC_NO_SIZE_DATA))
+			if (CFS_FAIL_CHECK(OBD_FAIL_OSC_NO_SIZE_DATA))
 				break;
 
 			lock_res(res);
@@ -1025,8 +1025,8 @@ static int osc_lock_enqueue(const struct lu_env *env,
 		if (osc_lock_is_lockless(oscl)) {
 			oio->oi_lockless = 1;
 		} else if (!async) {
-			if (OBD_FAIL_PRECHECK(OBD_FAIL_PTLRPC_IDLE_RACE)) {
-				OBD_RACE(OBD_FAIL_PTLRPC_IDLE_RACE);
+			if (CFS_FAIL_PRECHECK(OBD_FAIL_PTLRPC_IDLE_RACE)) {
+				CFS_RACE(OBD_FAIL_PTLRPC_IDLE_RACE);
 				set_current_state(TASK_UNINTERRUPTIBLE);
 				schedule_timeout(HZ / 2);
 			}
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index 128b7d15d760..3298a9923ea2 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -1243,7 +1243,7 @@ static int osc_checksum_bulk_t10pi(const char *obd_name, int nob,
 		 * simulate an OST->client data error
 		 */
 		if (unlikely(i == 0 && opc == OST_READ &&
-			     OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE))) {
+			     CFS_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE))) {
 			unsigned char *ptr = kmap(pga[i]->pg);
 
 			memcpy(ptr + off, "bad1", min_t(typeof(nob), 4, nob));
@@ -1292,7 +1292,7 @@ static int osc_checksum_bulk_t10pi(const char *obd_name, int nob,
 		 * of corrupting the data so it is still correct on a redo
 		 */
 		if (opc == OST_WRITE &&
-		    OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_SEND))
+		    CFS_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_SEND))
 			cksum++;
 
 		*check_sum = cksum;
@@ -1328,7 +1328,7 @@ static int osc_checksum_bulk(int nob, u32 pg_count,
 		 * simulate an OST->client data error
 		 */
 		if (i == 0 && opc == OST_READ &&
-		    OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE)) {
+		    CFS_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE)) {
 			unsigned char *ptr = kmap(pga[i]->pg);
 			int off = pga[i]->off & ~PAGE_MASK;
 
@@ -1356,7 +1356,7 @@ static int osc_checksum_bulk(int nob, u32 pg_count,
 	/* For sending we only compute the wrong checksum instead
 	 * of corrupting the data so it is still correct on a redo
 	 */
-	if (opc == OST_WRITE && OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_SEND))
+	if (opc == OST_WRITE && CFS_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_SEND))
 		(*cksum)++;
 
 	return 0;
@@ -1537,9 +1537,9 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 		if (clpage->cp_type == CPT_TRANSIENT)
 			directio = true;
 	}
-	if (OBD_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ))
+	if (CFS_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ))
 		return -ENOMEM; /* Recoverable */
-	if (OBD_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ2))
+	if (CFS_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ2))
 		return -EINVAL; /* Fatal */
 
 	if ((cmd & OBD_BRW_WRITE) != 0) {
@@ -1804,7 +1804,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 
 	if (inode && IS_ENCRYPTED(inode) &&
 	    fscrypt_has_encryption_key(inode) &&
-	    !OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG)) {
+	    !CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG)) {
 		if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) {
 			body->oa.o_valid |= OBD_MD_FLFLAGS;
 			body->oa.o_flags = 0;
@@ -2846,7 +2846,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
 		       cmd == OBD_BRW_READ ? "read" : "write", starting_offset,
 		       ending_offset, cli->cl_r_in_flight, cli->cl_w_in_flight);
 	}
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_IO, cfs_fail_val);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_IO, cfs_fail_val);
 
 	ptlrpcd_add_req(req);
 	rc = 0;
@@ -2987,10 +2987,10 @@ int osc_enqueue_interpret(const struct lu_env *env, struct ptlrpc_request *req,
 	ldlm_lock_addref(lockh, mode);
 
 	/* Let cl_lock_state_wait fail with -ERESTARTSYS to unuse sublocks. */
-	OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_ENQUEUE_HANG, 2);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_LDLM_ENQUEUE_HANG, 2);
 
 	/* Let CP AST to grant the lock first. */
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_CP_ENQ_RACE, 1);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_CP_ENQ_RACE, 1);
 
 	if (aa->oa_speculative) {
 		LASSERT(!aa->oa_lvb);
@@ -3006,7 +3006,7 @@ int osc_enqueue_interpret(const struct lu_env *env, struct ptlrpc_request *req,
 	rc = osc_enqueue_fini(req, aa->oa_upcall, aa->oa_cookie, lockh, mode,
 			      aa->oa_flags, aa->oa_speculative, rc);
 
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_CP_CANCEL_RACE, 10);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_CP_CANCEL_RACE, 10);
 
 	ldlm_lock_decref(lockh, mode);
 	LDLM_LOCK_PUT(lock);
@@ -3165,7 +3165,7 @@ int osc_match_base(const struct lu_env *env, struct obd_export *exp,
 	u64 lflags = *flags;
 	enum ldlm_mode rc;
 
-	if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
+	if (CFS_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
 		return -EIO;
 
 	/* Filesystem lock extents are extended to page boundaries so that
@@ -3432,7 +3432,7 @@ int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,
 	char *tmp;
 	int rc;
 
-	OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SHUTDOWN, 10);
+	CFS_FAIL_TIMEOUT(OBD_FAIL_OSC_SHUTDOWN, 10);
 
 	if (KEY_IS(KEY_CHECKSUM)) {
 		if (vallen != sizeof(int))
