Make ctl(4) build with CTL_IO_DELAY defined.

sys/cam/ctl/ctl.c:
	In ctl_datamove(), inside CTL_IO_DELAY, add a lun variable and fill
	it in before trying to dereference it.

MFC after:	3 days
Sponsored by:	Spectra Logic
This commit is contained in:
Kenneth D. Merry 2017-02-17 20:15:27 +00:00
parent 492a2ef556
commit e9200a6cc2

View File

@ -12405,6 +12405,9 @@ ctl_datamove(union ctl_io *io)
if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) {
io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE;
} else {
struct ctl_lun *lun;
lun = CTL_LUN(io);
if ((lun != NULL)
&& (lun->delay_info.datamove_delay > 0)) {