The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-setattr-prepare.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 AC_DEFUN([ZFS_AC_KERNEL_SRC_SETATTR_PREPARE], [
    2         dnl #
    3         dnl # 4.9 API change
    4         dnl # The inode_change_ok() function has been renamed setattr_prepare()
    5         dnl # and updated to take a dentry rather than an inode.
    6         dnl #
    7         ZFS_LINUX_TEST_SRC([setattr_prepare], [
    8                 #include <linux/fs.h>
    9         ], [
   10                 struct dentry *dentry = NULL;
   11                 struct iattr *attr = NULL;
   12                 int error __attribute__ ((unused)) =
   13                         setattr_prepare(dentry, attr);
   14         ])
   15 
   16         dnl #
   17         dnl # 5.12 API change
   18         dnl # The setattr_prepare() function has been changed to accept a new argument
   19         dnl # for struct user_namespace*
   20         dnl #
   21         ZFS_LINUX_TEST_SRC([setattr_prepare_userns], [
   22                 #include <linux/fs.h>
   23         ], [
   24                 struct dentry *dentry = NULL;
   25                 struct iattr *attr = NULL;
   26                 struct user_namespace *userns = NULL;
   27                 int error __attribute__ ((unused)) =
   28                         setattr_prepare(userns, dentry, attr);
   29         ])
   30 ])
   31 
   32 AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE], [
   33         AC_MSG_CHECKING([whether setattr_prepare() is available and accepts struct user_namespace*])
   34         ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare_userns],
   35             [setattr_prepare], [fs/attr.c], [
   36                 AC_MSG_RESULT(yes)
   37                 AC_DEFINE(HAVE_SETATTR_PREPARE_USERNS, 1,
   38                     [setattr_prepare() accepts user_namespace])
   39         ], [
   40                 AC_MSG_RESULT(no)
   41 
   42                 AC_MSG_CHECKING([whether setattr_prepare() is available, doesn't accept user_namespace])
   43                 ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare],
   44                         [setattr_prepare], [fs/attr.c], [
   45                         AC_MSG_RESULT(yes)
   46                         AC_DEFINE(HAVE_SETATTR_PREPARE_NO_USERNS, 1,
   47                                 [setattr_prepare() is available, doesn't accept user_namespace])
   48                 ], [
   49                         AC_MSG_RESULT(no)
   50                 ])
   51         ])
   52 ])

Cache object: 4f4f5e04b1bf46b01abd317cc81049e7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.