From 92b7657096fbc67ae14ef278d838cb50efe317cc Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Fri, 15 Aug 2014 14:42:41 -0500 Subject: [PATCH] LU-5396: define __acquires, __releases and __must_hold for userspace Some functions that are shared between userspace and the kernel have sparse annotations. So we need to also define these annotations in userspace. Change-Id: Ie1e55416554d3295ed61fe26615d5241faa53818 Signed-off-by: frank zago Reviewed-on: http://review.whamcloud.com/11481 Reviewed-by: John L. Hammond Tested-by: Jenkins Reviewed-by: Patrick Farrell Tested-by: Maloo Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/libcfs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcfs/include/libcfs/libcfs.h b/libcfs/include/libcfs/libcfs.h index 4d3122e..e8395f1 100644 --- a/libcfs/include/libcfs/libcfs.h +++ b/libcfs/include/libcfs/libcfs.h @@ -90,7 +90,11 @@ static inline int __is_po2(unsigned long long val) # define __must_hold(x) # endif /* !__CHECKER__ */ # endif /* !__must_hold */ -#endif /* __KERNEL__ */ +#else /* __KERNEL__ */ +# define __acquires(x) +# define __releases(x) +# define __must_hold(x) +#endif /* !__KERNEL__ */ /* * Lustre Error Checksum: calculates checksum -- 1.8.3.1