X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre_compat.h;h=f55f6e5ed96d2f6195b51468983e88e66b8a0aa2;hp=13ed36b88d2a171aae09923fe610633bf1d0d2af;hb=fd193758bb95e3fbb4cd04e88f0d964f9cb510cf;hpb=b4a959eb61bc7e6a64261c704f3f3f5e220c2f02 diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 13ed36b..f55f6e5 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -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 @@ -386,11 +394,6 @@ static inline int radix_tree_exceptional_entry(void *arg) static inline void truncate_inode_pages_final(struct address_space *map) { truncate_inode_pages(map, 0); - /* Workaround for LU-118 */ - if (map->nrpages) { - spin_lock_irq(&map->tree_lock); - spin_unlock_irq(&map->tree_lock); - } /* Workaround end */ } #endif @@ -739,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 @@ -774,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)