Whamcloud - gitweb
LU-12331 llite: create obd_device with usercopy whitelist
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index 03a1c3a..920d850 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/xattr.h>
 #include <linux/workqueue.h>
 #include <linux/blkdev.h>
+#include <linux/slab.h>
 
 #include <libcfs/linux/linux-fs.h>
 #include <lustre_patchless_compat.h>
@@ -826,4 +827,10 @@ static inline bool bdev_integrity_enabled(struct block_device *bdev, int rw)
 #define xa_unlock_irq(lockp) spin_unlock_irq(lockp)
 #endif
 
+#ifndef KMEM_CACHE_USERCOPY
+#define kmem_cache_create_usercopy(name, size, align, flags, useroffset, \
+                                  usersize, ctor)                       \
+       kmem_cache_create(name, size, align, flags, ctor)
+#endif
+
 #endif /* _LUSTRE_COMPAT_H */