Skip to content
Commit 2e79cf37 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: bfa: Rework bfad_reset_sdev_bflags()



Since commit f93ed747 ("scsi: core: Release SCSI devices
synchronously") it is no longer allowed to call scsi_device_put() from
atomic context.

Rework bfad_reset_sdev_bflags() such that scsi_device_put() is no longer
called. This fixes the following smatch warning:

drivers/scsi/bfa/bfad_bsg.c:2551 bfad_iocmd_lunmask_reset_lunscan_mode() warn: sleeping in atomic context

bfad_iocmd_lunmask() <- disables preempt
-> bfad_iocmd_lunmask_reset_lunscan_mode()
   -> scsi_device_put()

Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221031224728.2607760-5-bvanassche@acm.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2e5a6c3b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment