From: Oleg Drokin Date: Thu, 31 Jan 2019 18:42:43 +0000 (-0500) Subject: LU-11568 ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab X-Git-Tag: 2.12.52~93 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=82d014e71e14671e876055851a0d37e98b4cc079 LU-11568 ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab Whatever it was doing does not appear to be necessary anymore as evidenced with newer kernels where the define was removed, but disabled in Lustre instead. Another important reason to remove it is because rhel7.3+ seems to have broken this RCU functionality and leads to frequent use after frees. Change-Id: I50991b9daf4ef06b24cb65d7a04a5e9b86706d36 Signed-off-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/34147 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo --- diff --git a/contrib/nn-final-symbol-list.txt b/contrib/nn-final-symbol-list.txt index da99c7c..88fde1f 100644 --- a/contrib/nn-final-symbol-list.txt +++ b/contrib/nn-final-symbol-list.txt @@ -255,7 +255,6 @@ \batomic_sub_and_test\b \bcall_wait_handler\b \binit_completion_module\b -\bSLAB_DESTROY_BY_RCU\b \bSLAB_KERNEL\b \bSLAB_NOFS\b \bTASK_INTERRUPTIBLE\b diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index df20146..4baa6ef 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -142,10 +142,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, #define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops) #endif -#ifndef SLAB_DESTROY_BY_RCU -#define SLAB_DESTROY_BY_RCU 0 -#endif - #ifndef HAVE_INIT_LIST_HEAD_RCU static inline void INIT_LIST_HEAD_RCU(struct list_head *list) { diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 55c6710..dd293e2 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -3193,7 +3193,7 @@ int ldlm_init(void) ldlm_lock_slab = kmem_cache_create("ldlm_locks", sizeof(struct ldlm_lock), 0, - SLAB_HWCACHE_ALIGN | SLAB_DESTROY_BY_RCU, NULL); + SLAB_HWCACHE_ALIGN, NULL); if (ldlm_lock_slab == NULL) goto out_resource;