From: Arshad Hussain Date: Tue, 29 Oct 2019 15:39:56 +0000 (+0530) Subject: LU-12923 ldlm: Use BUILD_BUG_ON() for ldlm_resource.c X-Git-Tag: 2.13.51~125 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=db25e324ad6b59b75db001a4f86d8467bed81ad2 LU-12923 ldlm: Use BUILD_BUG_ON() for ldlm_resource.c This patch replaces all CLASSERT() with kernel defined BUILD_BUG_ON() for file lustre/ldlm/ldlm_resource.c Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I16e32c16de09ef020ed0dad1775403d9d3c55ef6 Reviewed-on: https://review.whamcloud.com/36720 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Petros Koutoupis Reviewed-by: Ben Evans Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index 4543c98..24c9e56 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -1768,7 +1768,7 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res) struct ldlm_lock *lock; unsigned int granted = 0; - CLASSERT(RES_NAME_SIZE == 4); + BUILD_BUG_ON(RES_NAME_SIZE != 4); if (!((libcfs_debug | D_ERROR) & level)) return;