Whamcloud - gitweb
LU-10805 ldlm: convert ACCESS_ONCE() to READ_ONCE()
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index 937935d..158bbb3 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/pagemap.h>
 #include <linux/bio.h>
 #include <linux/xattr.h>
+#include <linux/workqueue.h>
 
 #include <libcfs/linux/linux-fs.h>
 #include <lustre_patchless_compat.h>
@@ -688,4 +689,12 @@ static inline struct timespec current_time(struct inode *inode)
 #define __GFP_COLD 0
 #endif
 
+#ifndef alloc_workqueue
+#define alloc_workqueue(name, flags, max_active) create_workqueue(name)
+#endif
+
+#ifndef READ_ONCE
+#define READ_ONCE ACCESS_ONCE
+#endif
+
 #endif /* _LUSTRE_COMPAT_H */