Whamcloud - gitweb
LU-5396: define __user for userspace 80/11480/2
authorFrank Zago <fzago@cray.com>
Fri, 15 Aug 2014 19:06:34 +0000 (14:06 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 27 Aug 2014 15:58:06 +0000 (15:58 +0000)
Structures used by ioctl are shared with the kernel. Some of these
structures will have the __user annotation for sparse, and thus __user
needs to be defined in user space

Change-Id: I2a4087a2faea0849cc816515c4aa9871699acf55
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11480
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/types.h

index 059caca..b4fd790 100644 (file)
@@ -79,4 +79,9 @@
 typedef unsigned long ulong_ptr_t;
 typedef long long_ptr_t;
 
+#ifndef __KERNEL__
+/* Sparse annotation. */
+#define __user
+#endif
+
 #endif /* _LIBCFS_TYPES_H */