scsi: core: Complain if scsi_target_block() fails
If scsi_target_block() fails that can break the code that calls this function. Hence complain loudly if scsi_target_block() fails. Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Ming Lei <ming.lei@redhat.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
09addb1d16
commit
94ef80a5f0
@ -2772,7 +2772,12 @@ static int scsi_internal_device_unblock(struct scsi_device *sdev,
|
||||
static void
|
||||
device_block(struct scsi_device *sdev, void *data)
|
||||
{
|
||||
scsi_internal_device_block(sdev);
|
||||
int ret;
|
||||
|
||||
ret = scsi_internal_device_block(sdev);
|
||||
|
||||
WARN_ONCE(ret, "scsi_internal_device_block(%s) failed: ret = %d\n",
|
||||
dev_name(&sdev->sdev_gendev), ret);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user