diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 951df7a7b..724e51d96 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -235,6 +235,7 @@ function evaluate(stmnt, pattern, arg, op, result) { gsub("MOFED_MINOR", MOFED_MINOR, stmnt) } + gsub("defined\\(_COMPAT_LINUX_MM_H\\)", "0", stmnt) gsub("defined\\(UEK_KABI_RENAME\\)", "0", stmnt) if (SCST_IO_CONTEXT != "") @@ -435,6 +436,7 @@ function handle_if(evaluated) || $0 ~ "RHEL_RELEASE_CODE" \ || $0 ~ "SOCK_RECVMSG_HAS_FOUR_ARGS" \ || $0 ~ "UEK_KABI_RENAME" \ + || $0 ~ "_COMPAT_LINUX_MM_H" \ || $0 ~ "USE_PRE_440_WR_STRUCTURE" \ || generating_upstream_patch_defined \ && $0 ~ "GENERATING_UPSTREAM_PATCH" \ diff --git a/scst/include/backport.h b/scst/include/backport.h index 0fff88b04..f8d91e996 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -33,6 +33,9 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) +#include +#endif #include /* struct scatterlist */ #include /* kmalloc() */ #include /* sizeof_field() */ @@ -849,15 +852,18 @@ enum kobj_ns_type { * 172856eac7cf ("kobject: Export kobj_ns_grab_current() and kobj_ns_drop()"; * v4.16). */ -static inline void *kobj_ns_grab_current(enum kobj_ns_type type) +static inline void *kobj_ns_grab_current_backport(enum kobj_ns_type type) { WARN_ON_ONCE(type != KOBJ_NS_TYPE_NET); return &init_net; } -static inline void kobj_ns_drop(enum kobj_ns_type type, void *ns) +static inline void kobj_ns_drop_backport(enum kobj_ns_type type, void *ns) { } + +#define kobj_ns_grab_current kobj_ns_grab_current_backport +#define kobj_ns_drop kobj_ns_drop_backport #endif /* */