Whamcloud - gitweb
LU-12923 mdd: Use BUILD_BUG_ON() for mdd_object.c 19/36719/3
authorArshad Hussain <arshad.super@gmail.com>
Tue, 29 Oct 2019 15:30:29 +0000 (21:00 +0530)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:15:43 +0000 (01:15 +0000)
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 <arshad.super@gmail.com>
Change-Id: I6badf6cbeb2726b643f494f68b2f30752ffffa8c
Reviewed-on: https://review.whamcloud.com/36719
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_object.c

index a9d2a51..aef4421 100644 (file)
@@ -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 */
        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;
 
        if (bits == 0)
                return 0;