scsi: core: Fail host creation if creating the proc directory fails
authorBart Van Assche <bvanassche@acm.org>
Sat, 15 Oct 2022 00:24:13 +0000 (17:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Oct 2022 03:17:09 +0000 (03:17 +0000)
commitecca3f9b16366e601a6748bf31e9fe227812248f
tree65eec1779b7610e2e0a0a9b36063e6b36ae83eda
parent77916da7e4a0975bd2b93e5214295e3318886cdb
scsi: core: Fail host creation if creating the proc directory fails

Users expect that the contents of /proc/scsi is in sync with the contents
of /sys/class/scsi_host. Hence fail host creation if creating the proc
directory fails.

Suggested-by: John Garry <john.garry@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221015002418.30955-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hosts.c
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_proc.c