From: Arshad Hussain Date: Tue, 29 Oct 2019 15:30:29 +0000 (+0530) Subject: LU-12923 mdd: Use BUILD_BUG_ON() for mdd_object.c X-Git-Tag: 2.13.51~126 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0978020c92f0b2b623f12cf2e5c9a9e0e7fc6411 LU-12923 mdd: Use BUILD_BUG_ON() for mdd_object.c This patch replaces all CLASSERT() with kernel defined BUILD_BUG_ON() for file lustre/mdd/mdd_object.c Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I6badf6cbeb2726b643f494f68b2f30752ffffa8c Reviewed-on: https://review.whamcloud.com/36719 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Neil Brown Reviewed-by: Petros Koutoupis Reviewed-by: Ben Evans Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index a9d2a51..aef4421 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -1048,7 +1048,7 @@ static int mdd_attr_set_changelog(const struct lu_env *env, bits |= (valid & LA_ATIME) ? 1 << CL_ATIME : 0; bits = bits & mdd->mdd_cl.mc_mask; /* This is an implementation limit rather than a protocol limit */ - CLASSERT(CL_LAST <= sizeof(int) * 8); + BUILD_BUG_ON(CL_LAST > sizeof(int) * 8); if (bits == 0) return 0;