scst: Backport the scsi_done() function

The scsi_done() function is new in kernel v5.16. Backport it to older
kernel versions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-11-22 03:47:29 +00:00
parent 47ba05f2a7
commit c8b3b06b2b

View File

@@ -2267,6 +2267,16 @@ static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd)
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
/*
* See also commit 11b68e36b167 ("scsi: core: Call scsi_done directly"; v5.16)
*/
static inline void scsi_done(struct scsi_cmnd *cmd)
{
return cmd->scsi_done(cmd);
}
#endif
/* <scsi/scsi_request.h> */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)