]>
Commit | Line | Data |
---|---|---|
75b07eca FG |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Brian Behlendorf <behlendorf1@llnl.gov> | |
3 | Date: Thu, 8 Feb 2018 14:31:08 -0800 | |
4 | Subject: [PATCH] Linux 4.11 compat: avoid refcount_t name conflict | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | Related to commit 4859fe796, when directly using the kernel's | |
10 | refcount functions in kernel compatibility code do not map | |
11 | refcount_t to zfs_refcount_t. This leads to a type mismatch. | |
12 | ||
13 | Longer term we should consider renaming refcount_t to | |
14 | zfs_refcount_t in the zfs code base. | |
15 | ||
16 | Reviewed-by: Olaf Faaland <faaland1@llnl.gov> | |
17 | Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> | |
18 | Reviewed-by: Chunwei Chen <david.chen@nutanix.com> | |
19 | Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> | |
20 | Closes #7148 | |
21 | (cherry picked from commit 3713b7333532f221733f7b74189d996359ed4311) | |
22 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
23 | --- | |
24 | include/linux/vfs_compat.h | 6 ++++++ | |
25 | 1 file changed, 6 insertions(+) | |
26 | ||
27 | diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h | |
28 | index 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 | -- | |
52 | 2.14.2 | |
53 |