From c21fded67cf3f0c7d5305931ac45ae5ab5fa836a Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Wed, 14 Nov 2012 22:12:13 -0500 Subject: [PATCH] Linux: change test for new putname API Replace the existing test with a more robust one that checks for the existence of the new filename structure. Since older kernels are expected to fail this test, we'll get the correct result even if there is unrelated failure, for instance a missing/different header file. Reviewed-on: http://gerrit.openafs.org/8466 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2bafb2f99d85804459acb8994d4057be809f8729) Change-Id: I88536425612e39b2f7d4d09c51ce896bc8cf6d4f Reviewed-on: http://gerrit.openafs.org/8559 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Hans-Werner Paulsen Tested-by: Hans-Werner Paulsen Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle --- acinclude.m4 | 5 +---- src/afs/LINUX/osi_compat.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index c14977a88..07bcd0f52 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -802,6 +802,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h]) AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) + AC_CHECK_LINUX_STRUCT([filename], [name], [fs.h]) AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h]) @@ -891,10 +892,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) [#include #include ], [path_lookup(NULL, 0, NULL);]) - AC_CHECK_LINUX_FUNC([putname], - [#include - #include ], - [putname(NULL);]) AC_CHECK_LINUX_FUNC([rcu_read_lock], [#include ], [rcu_read_lock();]) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index c6d900246..c71384df8 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -461,7 +461,7 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct } #endif -#if defined(HAVE_LINUX_PUTNAME) +#if !defined(STRUCT_FILENAME_HAS_NAME) typedef char *afs_name_t; static inline char * -- 2.39.5