Whamcloud - gitweb
LU-12923 ldlm: Use BUILD_BUG_ON() for ldlm_resource.c 20/36720/2
authorArshad Hussain <arshad.super@gmail.com>
Tue, 29 Oct 2019 15:39:56 +0000 (21:09 +0530)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:15:48 +0000 (01:15 +0000)
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 <arshad.super@gmail.com>
Change-Id: I16e32c16de09ef020ed0dad1775403d9d3c55ef6
Reviewed-on: https://review.whamcloud.com/36720
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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/ldlm/ldlm_resource.c

index 4543c98..24c9e56 100644 (file)
@@ -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;