zfsonlinux/zfs — pull request #884 by maxximino (2012-08-23 13:12:39+00:00)
Title: Fix snapshot automounting with GrSecurity constify plugin.

./configure erroneously detects absence of dops->d_automount when built against a GrSecurity patched kernel.

Error message found in config.log:

configure:24349: checking whether dops->d_automount() exists
configure:24384: cp conftest.c build && make modules -C /mypool/vm/hardenedchroot/kernelsrc/withzfs/linux-3.4.7/ EXTRA_CFLAGS=-Werror-implicit-function-declaration -Werror M=/mypool/vm/hardenedchroot/kernelsrc/withzfs/zfs/build modpost=true
/mypool/vm/hardenedchroot/kernelsrc/withzfs/zfs/build/conftest.c: In function 'main':
/mypool/vm/hardenedchroot/kernelsrc/withzfs/zfs/build/conftest.c:132:28: error: constified variable 'dops' cannot be local
make[1]: *** [/mypool/vm/hardenedchroot/kernelsrc/withzfs/zfs/build/conftest.o] Error 1
make: *** [_module_/mypool/vm/hardenedchroot/kernelsrc/withzfs/zfs/build] Error 2

The "dops" variable cannot be a local variable, so it's moved to the global scope.