xref: /freebsd/sys/contrib/openzfs/config/kernel-generic_fillattr.m4 (revision 77013d11e6483b970af25e13c9b892075742f7e5)
1dnl #
2dnl # 5.12 API
3dnl #
4dnl # generic_fillattr in linux/fs.h now requires a struct user_namespace*
5dnl # as the first arg, to support idmapped mounts.
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR_USERNS], [
8	ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
9		#include <linux/fs.h>
10	],[
11		struct user_namespace *userns = NULL;
12		struct inode *in = NULL;
13		struct kstat *k = NULL;
14		generic_fillattr(userns, in, k);
15	])
16])
17
18AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR_USERNS], [
19	AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
20	ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
21		AC_MSG_RESULT([yes])
22		AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
23		    [generic_fillattr requires struct user_namespace*])
24	],[
25		AC_MSG_RESULT([no])
26	])
27])
28
29