From c82bf2659bc8dfe356ae12969c3e1bdd79be7a96 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 21 Nov 2014 08:24:37 +0000 Subject: [PATCH] Log errors for absent LUNs too. MFC after: 1 week --- sys/cam/ctl/ctl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 7772910e2d5e..951dde2ce456 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -13710,7 +13710,7 @@ static int ctl_process_done(union ctl_io *io) { struct ctl_lun *lun; - struct ctl_softc *ctl_softc; + struct ctl_softc *ctl_softc = control_softc; void (*fe_done)(union ctl_io *io); uint32_t targ_port = ctl_port_idx(io->io_hdr.nexus.targ_port); @@ -13776,10 +13776,8 @@ ctl_process_done(union ctl_io *io) if (lun == NULL) { CTL_DEBUG_PRINT(("NULL LUN for lun %d\n", io->io_hdr.nexus.targ_mapped_lun)); - fe_done(io); goto bailout; } - ctl_softc = lun->ctl_softc; mtx_lock(&lun->lun_lock); @@ -13851,6 +13849,8 @@ ctl_process_done(union ctl_io *io) } else mtx_unlock(&lun->lun_lock); +bailout: + /* * If this command has been aborted, make sure we set the status * properly. The FETD is responsible for freeing the I/O and doing @@ -13933,8 +13933,6 @@ ctl_process_done(union ctl_io *io) } else fe_done(io); -bailout: - return (CTL_RETVAL_COMPLETE); }