mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
scsi: zfcp: Add __must_hold() attribute to zfcp_qdio_sbal_get()
Add __must_hold() attribute to zfcp_qdio_sbal_get() in order to let
clang's context analysis know that qdio->req_q_wq must be held on
function entry. This is also documented above the function. Without this
annotation this leads to a valid warning when context analysis is
enabled:
drivers/s390/scsi/zfcp_qdio.c:287:8: warning:
expecting spinlock '->req_q_lock' to be held at start of each loop [-Wthread-safety-analysis]
287 | ret = wait_event_interruptible_lock_irq_timeout(qdio->req_q_wq,
| ^
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://patch.msgid.link/20260806134759.2122369-2-hca@linux.ibm.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
dc59e4fea9
commit
ea598cfa56
|
|
@ -152,7 +152,8 @@ extern ssize_t zfcp_fsf_scnprint_fc_security(char *buf, size_t size,
|
|||
/* zfcp_qdio.c */
|
||||
extern int zfcp_qdio_setup(struct zfcp_adapter *);
|
||||
extern void zfcp_qdio_destroy(struct zfcp_qdio *);
|
||||
extern int zfcp_qdio_sbal_get(struct zfcp_qdio *);
|
||||
extern int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio)
|
||||
__must_hold(qdio->req_q_lock);
|
||||
extern int zfcp_qdio_send(struct zfcp_qdio *, struct zfcp_qdio_req *);
|
||||
extern int zfcp_qdio_sbals_from_sg(struct zfcp_qdio *, struct zfcp_qdio_req *,
|
||||
struct scatterlist *);
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ static int zfcp_qdio_sbal_check(struct zfcp_qdio *qdio)
|
|||
* Returns: 0 on success, -EIO if there is no free sbal after waiting.
|
||||
*/
|
||||
int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio)
|
||||
__must_hold(qdio->req_q_lock)
|
||||
{
|
||||
long ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user