]> 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)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 19 Nov 2012 12:21:52 +0000 (04:21 -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.

Change-Id: Ie50abce37580eab803e9b07e636a1538f4a91a81
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>
acinclude.m4
src/afs/LINUX/osi_compat.h

index 7ba756fac9dfbf9f4b426df8dc9a4c56458585c4..83ce22d577690ba3395b2dc036fb265ea45b299d 100644 (file)
@@ -824,6 +824,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])
@@ -913,10 +914,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 df40c9b8dedf9a9270a38d59e86d7f8dc0511687..ddf8a47e0b38129b905e2ae971acf2c4ab9f6ae7 100644 (file)
@@ -524,7 +524,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 *