Whamcloud - gitweb
LU-10937 sptlrpc: split sptlrpc_process_config()
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index fdb2010..f55f6e5 100644 (file)
@@ -148,6 +148,14 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
 #define SLAB_DESTROY_BY_RCU 0
 #endif
 
+#ifndef HAVE_INIT_LIST_HEAD_RCU
+static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
+{
+       WRITE_ONCE(list->next, list);
+       WRITE_ONCE(list->prev, list);
+}
+#endif
+
 #ifndef HAVE_DQUOT_SUSPEND
 # define ll_vfs_dq_init             vfs_dq_init
 # define ll_vfs_dq_drop             vfs_dq_drop
@@ -734,6 +742,7 @@ static inline unsigned int bip_size(struct bio_integrity_payload *bip)
 #endif
 }
 
+#ifdef HAVE_BLK_INTEGRITY_ENABLED
 #ifndef INTEGRITY_FLAG_READ
 #define INTEGRITY_FLAG_READ BLK_INTEGRITY_VERIFY
 #endif
@@ -769,6 +778,12 @@ static inline bool bdev_integrity_enabled(struct block_device *bdev, int rw)
 
        return false;
 }
+#else
+static inline bool bdev_integrity_enabled(struct block_device *bdev, int rw)
+{
+       return false;
+}
+#endif /* HAVE_BLK_INTEGRITY_ENABLED */
 
 #ifdef HAVE_PAGEVEC_INIT_ONE_PARAM
 #define ll_pagevec_init(pvec, n) pagevec_init(pvec)