bozo: Introduce bnode_Wait()
[openafs.git] / src / cf / linux-kernel-sig.m4
1 AC_DEFUN([OPENAFS_LINUX_KERNEL_SIG_CHECKS],[
2 dnl Operation signature checks
3 AC_CHECK_LINUX_OPERATION([inode_operations], [follow_link], [no_nameidata],
4                          [#include <linux/fs.h>],
5                          [const char *],
6                          [struct dentry *dentry, void **link_data])
7 AC_CHECK_LINUX_OPERATION([inode_operations], [put_link], [no_nameidata],
8                          [#include <linux/fs.h>],
9                          [void],
10                          [struct inode *inode, void *link_data])
11 AC_CHECK_LINUX_OPERATION([inode_operations], [rename], [takes_flags],
12                          [#include <linux/fs.h>],
13                          [int],
14                          [struct inode *oinode, struct dentry *odentry,
15                          struct inode *ninode, struct dentry *ndentry,
16                          unsigned int flags])
17 dnl Linux 5.12 added the user_namespace parameter to the several
18 dnl inode operations functions.
19 dnl Perform a generic test using the inode_op create to test for this change.
20 AC_CHECK_LINUX_OPERATION([inode_operations], [create], [user_namespace],
21                          [#include <linux/fs.h>],
22                          [int],
23                          [struct user_namespace *mnt_userns,
24                          struct inode *inode, struct dentry *dentry,
25                          umode_t umode, bool flag])
26 dnl if HAVE_LINUX_INODE_OPERATIONS_CREATE_USER_NAMESPACE, create a more generic
27 dnl define.
28 AS_IF([test AS_VAR_GET([ac_cv_linux_operation_inode_operations_create_user_namespace]) = yes],
29       [AC_DEFINE([IOP_TAKES_USER_NAMESPACE], 1,
30                  [define if inodeops require struct user_namespace])])
31 dnl Linux 6.3 replaced the user_namespace parameter with mnt_idmap for
32 dnl the inode operations functions.
33 AC_CHECK_LINUX_OPERATION([inode_operations], [create], [mnt_idmap],
34                          [#include <linux/fs.h>],
35                          [int],
36                          [struct mnt_idmap *idmap,
37                          struct inode *inode, struct dentry *dentry,
38                          umode_t umode, bool flag])
39 dnl if HAVE_LINUX_INODE_OPERATIONS_CREATE_MNT_IDMAP, create a more generic
40 dnl define.
41 AS_IF([test AS_VAR_GET([ac_cv_linux_operation_inode_operations_create_mnt_idmap]) = yes],
42       [AC_DEFINE([IOP_TAKES_MNT_IDMAP], 1,
43                  [define if inodeops require struct mnt_idmap])])
44 ])