]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: Rework statfs super block operations configure test
authorMarc Dionne <marc.c.dionne@gmail.com>
Wed, 11 Aug 2010 23:28:53 +0000 (19:28 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 14 Dec 2010 18:15:52 +0000 (10:15 -0800)
The configure test to detect if the statfs super block operation
needs a dentry argument is based on vfs_statfs, and assumes that
its signature matches the one of the operation.  In 2.6.36 this is
no longer true and the test fails.

Rework the test to actually test the operation we're interested in.

This change is required for 2.6.36.

Reviewed-on: http://gerrit.openafs.org/2545
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit 08552ad8a94f7cc5908aabe8385711e09a6418e4)

Reviewed-on: http://gerrit.openafs.org/2553
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b8b708fc416aa281fe1d1ce1d498cc381c81679c)
Change-Id: Ib40de2018ecec5e3c82d8fa829364c31d29526b4
Reviewed-on: http://gerrit.openafs.org/3516
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
src/cf/linux-test4.m4

index 2677f04d02f5113e4404bddf57c68a662ce1c93b..06df41d827f0e3913db0fa3f52a93efccb400a47 100644 (file)
@@ -722,9 +722,10 @@ AC_DEFUN([LINUX_STATFS_TAKES_DENTRY], [
     AC_TRY_KBUILD(
 [#include <linux/fs.h>
 #include <linux/statfs.h>],
-[
-extern int vfs_statfs(struct dentry *, struct kstatfs *);
-],
+[struct super_block _sb;
+struct dentry _dentry;
+struct kstatfs _kstatfs;
+(void)_sb.s_op->statfs(&_dentry, &_kstatfs);],
       ac_cv_linux_statfs_takes_dentry=yes,
       ac_cv_linux_statfs_takes_dentry=no)])
   AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)])