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