Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e42bc9d authored by Li Xi's avatar Li Xi Committed by Greg Kroah-Hartman
Browse files

staging/lustre: remove assertion of spin_is_locked()



spin_is_locked() is always false when the platform is
uniprocessor and CONFIG_DEBUG_SPINLOCK is not enabled.
This patch replaces its assertion by assert_spin_locked().

Signed-off-by: default avatarLi Xi <lixi@ddn.com>
Signed-off-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/8144
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199


Reviewed-by: default avatarAlexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d95f10e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@
 * - spin_unlock(x)
 * - spin_unlock_bh(x)
 * - spin_trylock(x)
 * - spin_is_locked(x)
 * - assert_spin_locked(x)
 *
 * - spin_lock_irq(x)
 * - spin_lock_irqsave(x, f)
+1 −1
Original line number Diff line number Diff line
@@ -1445,7 +1445,7 @@ static inline void unlock_res(struct ldlm_resource *res)
/** Check if resource is already locked, assert if not. */
static inline void check_res_locked(struct ldlm_resource *res)
{
	LASSERT(spin_is_locked(&res->lr_lock));
	assert_spin_locked(&res->lr_lock);
}

struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock);
+1 −1
Original line number Diff line number Diff line
@@ -719,7 +719,7 @@ struct ptlrpc_nrs_pol_ops {
	 *			 \a nrq
	 * \param[in,out] nrq	 The request
	 *
	 * \pre spin_is_locked(&svcpt->scp_req_lock)
	 * \pre assert_spin_locked(&svcpt->scp_req_lock)
	 *
	 * \see ptlrpc_nrs_req_stop_nolock()
	 */
+2 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
	int i;
	int rc = 0;

	LASSERT(spin_is_locked(&lsm->lsm_lock));
	assert_spin_locked(&lsm->lsm_lock);
	LASSERT(lsm->lsm_lock_owner == current_pid());

	CDEBUG(D_INODE, "MDT ID "DOSTID" initial value: s="LPU64" m="LPU64
@@ -145,7 +145,7 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
	int stripe = 0;
	__u64 kms;

	LASSERT(spin_is_locked(&lsm->lsm_lock));
	assert_spin_locked(&lsm->lsm_lock);
	LASSERT(lsm->lsm_lock_owner == current_pid());

	if (shrink) {
+1 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ static struct cl_lock *cl_lock_lookup(const struct lu_env *env,
	struct cl_object_header *head;

	head = cl_object_header(obj);
	LINVRNT(spin_is_locked(&head->coh_lock_guard));
	assert_spin_locked(&head->coh_lock_guard);
	CS_LOCK_INC(obj, lookup);
	list_for_each_entry(lock, &head->coh_locks, cll_linkage) {
		int matched;
Loading