diff --git a/acinclude.m4 b/acinclude.m4 index 18b454f60c..29e083efe1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -935,6 +935,10 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) LINUX_SYSCTL_TABLE_CHECKING LINUX_HAVE_IGET LINUX_HAVE_I_SIZE_READ + LINUX_HAVE_D_ALLOC_ANON + if test "x$ac_cv_linux_d_alloc_anon" = "xno"; then + AC_DEFINE([AFS_NONFSTRANS], 1, [define to disable the nfs translator]) + fi LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH LINUX_EXPORTS_INIT_MM LINUX_EXPORTS_SYS_CHDIR diff --git a/src/afs/LINUX/osi_export.c b/src/afs/LINUX/osi_export.c index e92f34bdc7..3218090842 100644 --- a/src/afs/LINUX/osi_export.c +++ b/src/afs/LINUX/osi_export.c @@ -27,6 +27,8 @@ RCSID #include "afs/afs_dynroot.h" #include "h/smp_lock.h" +#if !defined(AFS_NONFSTRANS) + /* #define OSI_EXPORT_DEBUG */ extern struct dentry_operations afs_dentry_operations; @@ -956,3 +958,5 @@ struct export_operations afs_export_ops = { .get_name = afs_export_get_name, .get_parent = afs_export_get_parent, }; + +#endif diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 5530fcecdf..a7dc33eed8 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -841,6 +841,22 @@ AC_DEFUN([LINUX_HAVE_I_SIZE_READ], [ AC_DEFINE([HAVE_LINUX_I_SIZE_READ], 1, [define if your kernel has i_size_read()]) fi]) +AC_DEFUN([LINUX_HAVE_D_ALLOC_ANON], [ + AC_MSG_CHECKING([for linux d_alloc_anon()]) + AC_CACHE_VAL([ac_cv_linux_d_alloc_anon], [ + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration" + AC_TRY_KBUILD( +[#include ], +[d_alloc_anon(NULL);], + ac_cv_linux_d_alloc_anon=yes, + ac_cv_linux_d_alloc_anon=no) + CPPFLAGS="$save_CPPFLAGS"]) + AC_MSG_RESULT($ac_cv_linux_d_alloc_anon) + if test "x$ac_cv_linux_d_alloc_anon" = "xyes"; then + AC_DEFINE([HAVE_LINUX_D_ALLOC_ANON], 1, [define if your kernel has d_alloc_anon()]) + fi]) + AC_DEFUN([LINUX_FREEZER_H_EXISTS], [ AC_MSG_CHECKING([for linux/freezer.h existance]) AC_CACHE_VAL([ac_cv_linux_freezer_h_exists], [