Commit 94ef80a5 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 09addb1d
...@@ -2772,7 +2772,12 @@ static int scsi_internal_device_unblock(struct scsi_device *sdev, ...@@ -2772,7 +2772,12 @@ static int scsi_internal_device_unblock(struct scsi_device *sdev,
static void static void
device_block(struct scsi_device *sdev, void *data) 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 static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment