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

Commit 72b97402 authored by Shlomo Pongratz's avatar Shlomo Pongratz Committed by Christoph Hellwig
Browse files

scsi/libiscsi: Fix static checker warning on bh locking



Commit 659743b0 "[SCSI] libiscsi: Reduce locking contention in fast path" introduced a
new smatch warning on libiscsi.c "iscsi_xmit_task() warn: inconsistent returns
bottom_half:: locked (1410 [(-61)]) unlocked (1425 [0], 1425 [s32min-(-1),1-s32max])",
which we can eliminate by using non bh locking on the nested spin_lock call.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarShlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent abb14148
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1442,9 +1442,9 @@ static int iscsi_xmit_task(struct iscsi_conn *conn)
		conn->task = NULL;
	}
	/* regular RX path uses back_lock */
	spin_lock_bh(&conn->session->back_lock);
	spin_lock(&conn->session->back_lock);
	__iscsi_put_task(task);
	spin_unlock_bh(&conn->session->back_lock);
	spin_unlock(&conn->session->back_lock);
	return rc;
}