Callers must provide a valid port group to alua_rtpg_queue(). Issue a
kernel warning if that is not the case.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Tang Junhui <tang.junhui@zte.com.cn>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
unsigned long flags;
struct workqueue_struct *alua_wq = kaluad_wq;
- if (!pg || scsi_device_get(sdev))
+ if (WARN_ON_ONCE(!pg) || scsi_device_get(sdev))
return false;
spin_lock_irqsave(&pg->lock, flags);