]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: change test for new putname API
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 15 Nov 2012 03:12:13 +0000 (22:12 -0500)
committerPaul Smeddle <paul.smeddle@gmail.com>
Wed, 5 Dec 2012 17:27:57 +0000 (09:27 -0800)
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 <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 2bafb2f99d85804459acb8994d4057be809f8729)

Change-Id: I88536425612e39b2f7d4d09c51ce896bc8cf6d4f
Reviewed-on: http://gerrit.openafs.org/8559
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Tested-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
acinclude.m4
src/afs/LINUX/osi_compat.h

index c14977a887483580e46858ebb930f7a93c544e41..07bcd0f520dce1b4ee97acc58fec7185cf99cb1f 100644 (file)
@@ -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 <linux/fs.h>
                                      #include <linux/namei.h>],
                                     [path_lookup(NULL, 0, NULL);])
-                AC_CHECK_LINUX_FUNC([putname],
-                                    [#include <linux/fs.h>
-                                     #include <linux/namei.h>],
-                                    [putname(NULL);])
                 AC_CHECK_LINUX_FUNC([rcu_read_lock],
                                     [#include <linux/rcupdate.h>],
                                     [rcu_read_lock();])
index c6d9002465dd7ac315419a5538549e1a9b9a2b90..c71384df875e4c0bb38f6769ada9bb8f61d36be1 100644 (file)
@@ -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 *