]> git.proxmox.com Git - zfsonlinux.git/blame - zfs-patches/0021-Linux-4.11-compat-avoid-refcount_t-name-conflict.patch
revert potentially buggy zap_add change
[zfsonlinux.git] / zfs-patches / 0021-Linux-4.11-compat-avoid-refcount_t-name-conflict.patch
CommitLineData
75b07eca
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Brian Behlendorf <behlendorf1@llnl.gov>
3Date: Thu, 8 Feb 2018 14:31:08 -0800
4Subject: [PATCH] Linux 4.11 compat: avoid refcount_t name conflict
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Related to commit 4859fe796, when directly using the kernel's
10refcount functions in kernel compatibility code do not map
11refcount_t to zfs_refcount_t. This leads to a type mismatch.
12
13Longer term we should consider renaming refcount_t to
14zfs_refcount_t in the zfs code base.
15
16Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
17Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
18Reviewed-by: Chunwei Chen <david.chen@nutanix.com>
19Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
20Closes #7148
21(cherry picked from commit 3713b7333532f221733f7b74189d996359ed4311)
22Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23---
24 include/linux/vfs_compat.h | 6 ++++++
25 1 file changed, 6 insertions(+)
26
27diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h
28index f51ff887d..7fcf3c055 100644
29--- a/include/linux/vfs_compat.h
30+++ b/include/linux/vfs_compat.h
31@@ -272,6 +272,10 @@ lseek_execute(
32 * This is several orders of magnitude larger than expected grace period.
33 * At 60 seconds the kernel will also begin issuing RCU stall warnings.
34 */
35+#ifdef refcount_t
36+#undef refcount_t
37+#endif
38+
39 #include <linux/posix_acl.h>
40
41 #if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)
42@@ -397,6 +401,8 @@ typedef mode_t zpl_equivmode_t;
43 #define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl)
44 #endif
45
46+#define refcount_t zfs_refcount_t
47+
48 #endif /* CONFIG_FS_POSIX_ACL */
49
50 /*
51--
522.14.2
53