Skip to content

Commit

Permalink
Linux 4.11 compat: avoid refcount_t name conflict
Browse files Browse the repository at this point in the history
Related to commit 4859fe7, 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 <faaland1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Chunwei Chen <david.chen@nutanix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#7148
  • Loading branch information
behlendorf authored and tonyhutter committed Mar 8, 2018
1 parent 6b1c14c commit bd04f8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/vfs_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 */

/*
Expand Down

0 comments on commit bd04f8c

Please sign in to comment.