mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	 bd29109f1a
			
		
	
	
		bd29109f1a
		
	
	
	
	
		
			
			As of Linux 4.2 the kernel has completely retired the nameidata structure. One of the few remaining consumers of this interface were the follow_link() and put_link() callbacks. This patch adds the required checks to configure to detect the interface change and updates the functions accordingly. Migrating to the simple_follow_link() interface was considered but was decided against ironically due to the increased complexity. It also should be noted that the kernel follow_link() and put_link() interfaces changes several times after 4.1 and but before 4.2. This means there is a narrow range of kernel commits which never appear in an official tag of the Linux kernel which ZoL will not build. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@gentoo.org> Issue #3596
		
			
				
	
	
		
			25 lines
		
	
	
		
			741 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			741 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 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])
 | |
| 	])
 | |
| ])
 |