Proxmox VE kernel compat, invalidate_inodes()

The Proxmox VE kernel contains a patch which renames the function
invalidate_inodes() to invalidate_inodes_check().  In the process
it adds a 'check' argument and a '#define invalidate_inodes(x)'
compatibility wrapper for legacy callers.  Therefore, if either
of these functions are exported invalidate_inodes() can be
safely used.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #58
This commit is contained in:
Brian Behlendorf
2011-12-21 14:22:45 -08:00
parent cd2817f8a6
commit 5f6c14b1ed
5 changed files with 100 additions and 6 deletions
+13
View File
@@ -1816,6 +1816,13 @@ dnl # The function invalidate_inodes() is no longer exported by the kernel.
dnl # The prototype however is still available which means it is safe
dnl # to acquire the symbol's address using spl_kallsyms_lookup_name().
dnl #
dnl # The Proxmox VE kernel contains a patch which renames the function
dnl # invalidate_inodes() to invalidate_inodes_check(). In the process
dnl # it adds a 'check' argument and a '#define invalidate_inodes(x)'
dnl # compatibility wrapper for legacy callers. Therefore, if either
dnl # of these functions are exported invalidate_inodes() can be
dnl # safely used.
dnl #
AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [
SPL_CHECK_SYMBOL_EXPORT(
[invalidate_inodes],
@@ -1823,6 +1830,12 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [
[AC_DEFINE(HAVE_INVALIDATE_INODES, 1,
[invalidate_inodes() is available])],
[])
SPL_CHECK_SYMBOL_EXPORT(
[invalidate_inodes_check],
[],
[AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1,
[invalidate_inodes_check() is available])],
[])
])
dnl #