aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-08 14:31:08 -0800
committerBrian Behlendorf <[email protected]>2018-02-08 21:25:51 -0800
commitf54976dc881549cc3222887188b110f2e8d05f0b (patch)
tree1e5337dab13beb0cf62f1fecc8ce42b8e442f880 /include/linux
parent18f57327e0c2c669034e1fff1260877fd70c3038 (diff)
Linux 4.11 compat: avoid refcount_t name conflict
Related to commit 4859fe796, when directly using the kernel's refcount functions in kernel compatibility code do not map refcount_t to zfs_refcount_t. This leads to a type mismatch. Longer term we should consider renaming refcount_t to zfs_refcount_t in the zfs code base. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7148
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/vfs_compat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h
index f51ff887d..7fcf3c055 100644
--- a/include/linux/vfs_compat.h
+++ b/include/linux/vfs_compat.h
@@ -272,6 +272,10 @@ lseek_execute(
* This is several orders of magnitude larger than expected grace period.
* At 60 seconds the kernel will also begin issuing RCU stall warnings.
*/
+#ifdef refcount_t
+#undef refcount_t
+#endif
+
#include <linux/posix_acl.h>
#if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)
@@ -397,6 +401,8 @@ typedef mode_t zpl_equivmode_t;
#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl)
#endif
+#define refcount_t zfs_refcount_t
+
#endif /* CONFIG_FS_POSIX_ACL */
/*