Whamcloud - gitweb
LU-5396: define __acquires, __releases and __must_hold for userspace 81/11481/7
authorFrank Zago <fzago@cray.com>
Fri, 15 Aug 2014 19:42:41 +0000 (14:42 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 27 Aug 2014 15:59:44 +0000 (15:59 +0000)
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 <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11481
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/libcfs.h

index 4d3122e..e8395f1 100644 (file)
@@ -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