]> git.proxmox.com Git - mirror_zfs.git/blob - config/kernel-follow-link-nameidata.m4
88c85accbef0fb80e50cdf9c714a8714766658e4
[mirror_zfs.git] / config / kernel-follow-link-nameidata.m4
1 dnl #
2 dnl # 4.2 API change
3 dnl # This kernel retired the nameidata structure which forced the
4 dnl # restructuring of the follow_link() prototype and how it is called.
5 dnl # We check for the new interface rather than detecting the old one.
6 dnl #
7 AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_LINK], [
8 AC_MSG_CHECKING([whether iops->follow_link() passes nameidata])
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/fs.h>
11 const char *follow_link(struct dentry *de, void **cookie)
12 { return "symlink"; }
13 static struct inode_operations iops __attribute__ ((unused)) = {
14 .follow_link = follow_link,
15 };
16 ],[
17 ],[
18 AC_MSG_RESULT(no)
19 ],[
20 AC_MSG_RESULT(yes)
21 AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
22 [iops->follow_link() nameidata])
23 ])
24 ])