From 1c219e57a8426f282163d0dbca8aa3159414b29c Mon Sep 17 00:00:00 2001
From: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
Date: Fri, 23 Mar 2018 18:17:36 +0100
Subject: [PATCH 067/518] target: drop spin_lock_assert() + irqs_disabled()
 combo checks

There are a few functions which check for if the lock is held
(spin_lock_assert()) and the interrupts are disabled (irqs_disabled()).
>From looking at the code, each function is static, the caller is near by
and does spin_lock_irq|safe(). As Linus puts it:

|It's not like this is some function that is exported to random users,
|and we should check that the calling convention is right.
|
|This looks like "it may have been useful during coding to document
|things, but it's not useful long-term".

Remove those checks.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
---
 drivers/target/target_core_transport.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index c20997bf314e9..d7463e60c75ae 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3269,9 +3269,6 @@ static int __transport_check_aborted_status(struct se_cmd *cmd, int send_status)
 {
 	int ret;
 
-	assert_spin_locked(&cmd->t_state_lock);
-	WARN_ON_ONCE(!irqs_disabled());
-
 	if (!(cmd->transport_state & CMD_T_ABORTED))
 		return 0;
 	/*
-- 
2.41.0

