mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 3.4 compat, d_make_root() replaces d_alloc_root()
torvalds/linux@adc0e91ab1 introduced introduced d_make_root() as a replacement for d_alloc_root(). Further commits appear to have removed d_alloc_root() from the Linux source tree. This causes the following failure: error: implicit declaration of function 'd_alloc_root' [-Werror=implicit-function-declaration] To correct this we update the code to use the current d_make_root() interface for readability. Then we introduce an autotools check to determine if d_make_root() is available. If it isn't then we define some compatibility logic which used the older d_alloc_root() interface. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #776
This commit is contained in:
committed by
Brian Behlendorf
parent
ab85f8455b
commit
6a0936babc
@@ -0,0 +1,12 @@
|
||||
dnl #
|
||||
dnl # 3.4.0 API change
|
||||
dnl # Added d_make_root() to replace previous d_alloc_root() function.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_D_MAKE_ROOT], [
|
||||
ZFS_CHECK_SYMBOL_EXPORT(
|
||||
[d_make_root],
|
||||
[fs/dcache.c],
|
||||
[AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
|
||||
[d_make_root() is available])],
|
||||
[])
|
||||
])
|
||||
@@ -48,6 +48,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CREATE_UMODE_T
|
||||
ZFS_AC_KERNEL_AUTOMOUNT
|
||||
ZFS_AC_KERNEL_INSERT_INODE_LOCKED
|
||||
ZFS_AC_KERNEL_D_MAKE_ROOT
|
||||
ZFS_AC_KERNEL_D_OBTAIN_ALIAS
|
||||
ZFS_AC_KERNEL_CHECK_DISK_SIZE_CHANGE
|
||||
ZFS_AC_KERNEL_TRUNCATE_SETSIZE
|
||||
|
||||
Reference in New Issue
Block a user