mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <massimo@mmmm.it> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Closes #884
This commit is contained in:
parent
08b1b21d58
commit
52cd92022e
@ -9,11 +9,11 @@ AC_DEFUN([ZFS_AC_KERNEL_AUTOMOUNT], [
|
|||||||
AC_MSG_CHECKING([whether dops->d_automount() exists])
|
AC_MSG_CHECKING([whether dops->d_automount() exists])
|
||||||
ZFS_LINUX_TRY_COMPILE([
|
ZFS_LINUX_TRY_COMPILE([
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
],[
|
struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||||
struct vfsmount *(*d_automount) (struct path *) = NULL;
|
|
||||||
struct dentry_operations dops __attribute__ ((unused)) = {
|
struct dentry_operations dops __attribute__ ((unused)) = {
|
||||||
.d_automount = d_automount,
|
.d_automount = d_automount,
|
||||||
};
|
};
|
||||||
|
],[
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_AUTOMOUNT, 1, [dops->automount() exists])
|
AC_DEFINE(HAVE_AUTOMOUNT, 1, [dops->automount() exists])
|
||||||
|
16
configure
vendored
16
configure
vendored
@ -16750,15 +16750,15 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
|
|
||||||
|
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
|
struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||||
|
struct dentry_operations dops __attribute__ ((unused)) = {
|
||||||
|
.d_automount = d_automount,
|
||||||
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct vfsmount *(*d_automount) (struct path *) = NULL;
|
|
||||||
struct dentry_operations dops __attribute__ ((unused)) = {
|
|
||||||
.d_automount = d_automount,
|
|
||||||
};
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@ -24359,15 +24359,15 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
|
|
||||||
|
|
||||||
#include <linux/dcache.h>
|
#include <linux/dcache.h>
|
||||||
|
struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||||
|
struct dentry_operations dops __attribute__ ((unused)) = {
|
||||||
|
.d_automount = d_automount,
|
||||||
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct vfsmount *(*d_automount) (struct path *) = NULL;
|
|
||||||
struct dentry_operations dops __attribute__ ((unused)) = {
|
|
||||||
.d_automount = d_automount,
|
|
||||||
};
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user