mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 19:50:25 +03:00
Handle any invalidate_inodes_check prototype.
In the comments of commit 723aa3b0c2
,
mmatuska reported that the test for invalidate_inodes_check() is broken
if invalidate_inodes() takes two arguments.
This patch fixes the issue by resorting to another approach for
detecting invalidate_inodes_check(): is simply checks if
invalidate_inodes is defined as a macro. If it is, then it concludes
that invalidate_inodes_check() is available. This will continue to work
even if the prototype of invalidate_inodes_check() changes over time.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #148
This commit is contained in:
parent
6576a1a70d
commit
476ff5a4da
@ -2072,9 +2072,10 @@ AC_DEFUN([SPL_AC_KERNEL_INVALIDATE_INODES], [
|
|||||||
AC_MSG_CHECKING([whether invalidate_inodes_check() is available])
|
AC_MSG_CHECKING([whether invalidate_inodes_check() is available])
|
||||||
SPL_LINUX_TRY_COMPILE_SYMBOL([
|
SPL_LINUX_TRY_COMPILE_SYMBOL([
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
], [
|
#ifndef invalidate_inodes
|
||||||
invalidate_inodes_check(NULL, 0);
|
#error invalidate_inodes is not a macro
|
||||||
], [invalidate_inodes_check], [], [
|
#endif
|
||||||
|
], [ ], [invalidate_inodes_check], [], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1,
|
AC_DEFINE(HAVE_INVALIDATE_INODES_CHECK, 1,
|
||||||
[invalidate_inodes_check() is available])
|
[invalidate_inodes_check() is available])
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -17147,13 +17147,14 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
|
|
||||||
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#ifndef invalidate_inodes
|
||||||
|
#error invalidate_inodes is not a macro
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
invalidate_inodes_check(NULL, 0);
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -23343,13 +23344,14 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
|
|
||||||
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#ifndef invalidate_inodes
|
||||||
|
#error invalidate_inodes is not a macro
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
invalidate_inodes_check(NULL, 0);
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user