diff options
Diffstat (limited to 'backport-include/linux/kmemleak.h')
-rw-r--r-- | backport-include/linux/kmemleak.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/backport-include/linux/kmemleak.h b/backport-include/linux/kmemleak.h new file mode 100644 index 0000000..99fff66 --- /dev/null +++ b/backport-include/linux/kmemleak.h @@ -0,0 +1,24 @@ +#include <linux/version.h> + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) +#include_next <linux/kmemleak.h> +#else +/* + * kmemleak was introduced on 2.6.31, since older kernels do not have + * we simply ignore its tuning. + */ +static inline void kmemleak_ignore(const void *ptr) +{ + return; +} + +static inline void kmemleak_not_leak(const void *ptr) +{ + return; +} + +static inline void kmemleak_no_scan(const void *ptr) +{ + return; +} +#endif |