scst_local: Fix a kernel oops for kernel versions < 2.6.37 (merge r5264 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5265 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-02-06 13:05:26 +00:00
parent 653a63ca73
commit 75768c6dd6
+8 -6
View File
@@ -949,6 +949,14 @@ static int scst_local_queuecommand_lck(struct scsi_cmnd *SCpnt,
TRACE_DBG("lun %d, cmd: 0x%02X", SCpnt->device->lun, SCpnt->cmnd[0]);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
/*
* We save a pointer to the done routine in SCpnt->scsi_done and
* we save that as tgt specific stuff below.
*/
SCpnt->scsi_done = done;
#endif
sess = to_scst_lcl_sess(scsi_get_device(SCpnt->device->host));
if (sess->unregistering) {
@@ -972,12 +980,6 @@ static int scst_local_queuecommand_lck(struct scsi_cmnd *SCpnt,
}
tgt_specific->cmnd = SCpnt;
tgt_specific->done = done;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
/*
* We save a pointer to the done routine in SCpnt->scsi_done and
* we save that as tgt specific stuff below.
*/
SCpnt->scsi_done = done;
#endif
/*