X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fofd%2Fofd_dlm.c;h=8e3fe937c7441384830adf683921418197c9ab7b;hp=2755d7e1ed1a1587f02ef03ada1be1ce629d22d3;hb=HEAD;hpb=3cbe63e72c83ba50c3553d28e2fe6bc9d18c347a diff --git a/lustre/ofd/ofd_dlm.c b/lustre/ofd/ofd_dlm.c index 2755d7e..baec254 100644 --- a/lustre/ofd/ofd_dlm.c +++ b/lustre/ofd/ofd_dlm.c @@ -23,11 +23,10 @@ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2015, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. * * lustre/ofd/ofd_dlm.c * @@ -162,7 +161,7 @@ static enum interval_iter ofd_intent_cb(struct interval_node *n, void *args) GOTO(out_release, rc); } - if (!OBD_FAIL_CHECK(OBD_FAIL_OST_GL_WORK_ALLOC)) + if (!CFS_FAIL_CHECK(OBD_FAIL_OST_GL_WORK_ALLOC)) OBD_SLAB_ALLOC_PTR_GFP(gl_work, ldlm_glimpse_work_kmem, GFP_ATOMIC); @@ -212,9 +211,9 @@ out: * \retval ELDLM_LOCK_ABORTED in other cases except error * \retval negative errno on error */ -int ofd_intent_policy(struct ldlm_namespace *ns, struct ldlm_lock **lockp, - void *req_cookie, enum ldlm_mode mode, __u64 flags, - void *data) +int ofd_intent_policy(const struct lu_env *env, struct ldlm_namespace *ns, + struct ldlm_lock **lockp, void *req_cookie, + enum ldlm_mode mode, __u64 flags, void *data) { struct ptlrpc_request *req = req_cookie; struct ldlm_lock *lock = *lockp; @@ -265,9 +264,9 @@ int ofd_intent_policy(struct ldlm_namespace *ns, struct ldlm_lock **lockp, */ if (flags & LDLM_FL_BLOCK_NOWAIT) { - OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_AGL_DELAY, 5); + CFS_FAIL_TIMEOUT(OBD_FAIL_LDLM_AGL_DELAY, 5); - if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_AGL_NOLOCK)) + if (CFS_FAIL_CHECK(OBD_FAIL_LDLM_AGL_NOLOCK)) RETURN(ELDLM_LOCK_ABORTED); } @@ -287,7 +286,7 @@ int ofd_intent_policy(struct ldlm_namespace *ns, struct ldlm_lock **lockp, /* The lock met with no resistance; we're finished. */ if (rc == LDLM_ITER_CONTINUE) { - if (OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2)) { + if (CFS_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2)) { ldlm_resource_unlink_lock(lock); err = ELDLM_LOCK_ABORTED; } else {