aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMassimo Maggi <[email protected]>2012-08-23 14:52:45 +0200
committerBrian Behlendorf <[email protected]>2012-08-24 08:56:38 -0700
commit52cd92022eaf8f105510df708d234012cbe5078d (patch)
treebf2cda13d57bd7ae7ac62e50ef10f4286620efdf
parent08b1b21d58b1ae8a67fec38ccda02489c4aa8115 (diff)
Fix snapshot automounting with GrSecurity constify plugin.
./configure erroneously detects absence of dops->d_automount when built against a GrSecurity patched kernel. Summerized error message found in config.log: checking whether dops->d_automount() exists ... In function 'main': ... error: constified variable 'dops' cannot be local The "dops" variable cannot be a local variable, so it's moved to the global scope. This test also fails if the prototype of the dops->d_automount function pointer is changed. Signed-off-by: Massimo Maggi <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #884
-rw-r--r--config/kernel-automount.m44
-rwxr-xr-xconfigure16
2 files changed, 10 insertions, 10 deletions
diff --git a/config/kernel-automount.m4 b/config/kernel-automount.m4
index 972b09bd0..1ee4c168d 100644
--- a/config/kernel-automount.m4
+++ b/config/kernel-automount.m4
@@ -9,12 +9,12 @@ AC_DEFUN([ZFS_AC_KERNEL_AUTOMOUNT], [
AC_MSG_CHECKING([whether dops->d_automount() exists])
ZFS_LINUX_TRY_COMPILE([
#include <linux/dcache.h>
- ],[
- struct vfsmount *(*d_automount) (struct path *) = NULL;
+ struct vfsmount *d_automount(struct path *p) { return NULL; }
struct dentry_operations dops __attribute__ ((unused)) = {
.d_automount = d_automount,
};
],[
+ ],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_AUTOMOUNT, 1, [dops->automount() exists])
],[
diff --git a/configure b/configure
index 23c90c2e3..83fc2a89c 100755
--- a/configure
+++ b/configure
@@ -16750,15 +16750,15 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <linux/dcache.h>
+ struct vfsmount *d_automount(struct path *p) { return NULL; }
+ struct dentry_operations dops __attribute__ ((unused)) = {
+ .d_automount = d_automount,
+ };
int
main (void)
{
- struct vfsmount *(*d_automount) (struct path *) = NULL;
- struct dentry_operations dops __attribute__ ((unused)) = {
- .d_automount = d_automount,
- };
;
return 0;
@@ -24359,15 +24359,15 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <linux/dcache.h>
+ struct vfsmount *d_automount(struct path *p) { return NULL; }
+ struct dentry_operations dops __attribute__ ((unused)) = {
+ .d_automount = d_automount,
+ };
int
main (void)
{
- struct vfsmount *(*d_automount) (struct path *) = NULL;
- struct dentry_operations dops __attribute__ ((unused)) = {
- .d_automount = d_automount,
- };
;
return 0;