diff --git a/scst/include/backport.h b/scst/include/backport.h index 9c636c5a5..576d7d65b 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -37,6 +37,7 @@ #include /* sizeof_field() */ #include #include +#include #include /* sync_page_range() */ #include #include /* struct scsi_cmnd */ @@ -1456,6 +1457,22 @@ static inline void *vzalloc(unsigned long size) } #endif +/* */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) +/* + * See also commit d320c03830b1 ("workqueue: s/__create_workqueue()/ + * alloc_workqueue()/, and add system workqueues") # v2.6.36. + */ +static inline struct workqueue_struct *alloc_workqueue(const char *fmt, + unsigned int flags, + int max_active, ...) +{ + WARN_ON_ONCE(flags | max_active); + return create_workqueue(fmt); +} +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) || \