From c8b3b06b2bae8bf5c1a1acb49e8622d03590ceac Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 22 Nov 2021 03:47:29 +0000 Subject: [PATCH] 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 --- scst/include/backport.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index ea69927d2..809d22062 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -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 + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)