dnl # posix_acl_chmod_masq() is not exported anymore and posix_acl_chmod()
dnl # was introduced to replace it.
dnl #
+dnl # 3.14 API change,
+dnl # posix_acl_chmod() is changed to __posix_acl_chmod()
+dnl #
AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CHMOD], [
AC_MSG_CHECKING([whether posix_acl_chmod exists])
ZFS_LINUX_TRY_COMPILE([
],[
AC_MSG_RESULT(no)
])
+
+ AC_MSG_CHECKING([whether __posix_acl_chmod exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include <linux/posix_acl.h>
+ ],[
+ __posix_acl_chmod(NULL, 0, 0)
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE___POSIX_ACL_CHMOD, 1, [__posix_acl_chmod() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
])
dnl #
#define zpl_inode_owner_or_capable(ip) is_owner_or_cap(ip)
#endif /* HAVE_INODE_OWNER_OR_CAPABLE */
-#ifndef HAVE_POSIX_ACL_CHMOD
+#ifndef HAVE___POSIX_ACL_CHMOD
+#ifdef HAVE_POSIX_ACL_CHMOD
+#define __posix_acl_chmod(acl, gfp, mode) posix_acl_chmod(acl, gfp, mode)
+#define __posix_acl_create(acl, gfp, mode) posix_acl_create(acl, gfp, mode)
+#else
static inline int
-posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) {
+__posix_acl_chmod(struct posix_acl **acl, int flags, umode_t umode) {
struct posix_acl *oldacl = *acl;
mode_t mode = umode;
int error;
}
static inline int
-posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep) {
+__posix_acl_create(struct posix_acl **acl, int flags, umode_t *umodep) {
struct posix_acl *oldacl = *acl;
mode_t mode = *umodep;
int error;
return (error);
}
#endif /* HAVE_POSIX_ACL_CHMOD */
+#endif /* HAVE___POSIX_ACL_CHMOD */
#ifndef HAVE_CURRENT_UMASK
static inline int
}
mode = ip->i_mode;
- error = posix_acl_create(&acl, GFP_KERNEL, &mode);
+ error = __posix_acl_create(&acl, GFP_KERNEL, &mode);
if (error >= 0) {
ip->i_mode = mode;
mark_inode_dirty(ip);
if (IS_ERR(acl) || !acl)
return (PTR_ERR(acl));
- error = posix_acl_chmod(&acl, GFP_KERNEL, ip->i_mode);
+ error = __posix_acl_chmod(&acl, GFP_KERNEL, ip->i_mode);
if (!error)
error = zpl_set_acl(ip, ACL_TYPE_ACCESS, acl);