From: Chas Williams Date: Fri, 4 Aug 2006 16:56:33 +0000 (+0000) Subject: DEVEL15-linux-kernel-updates-20060804 X-Git-Tag: openafs-devel-1_5_6~11 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=73902c4a3b7b027dce40a445cd0c8f1ec989015f;p=packages%2Fo%2Fopenafs.git DEVEL15-linux-kernel-updates-20060804 updates for new stuff in linux kernels (cherry picked from commit a901d2b8ad9cfb3060b7824179b92b16e5f3dd14) --- diff --git a/acinclude.m4 b/acinclude.m4 index 378bfb48e..66e24a7af 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -130,6 +130,10 @@ case $system in LINUX_KERNEL_PATH="/usr/src/linux" fi fi + if test -f "$LINUX_KERNEL_PATH/include/linux/utsrelease.h"; then + linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` + LINUX_VERSION="$linux_kvers" + else if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` if test "x$linux_kvers" = "x"; then @@ -152,6 +156,7 @@ case $system in else enable_kernel_module="no" fi + fi if test ! -f "$LINUX_KERNEL_PATH/include/linux/autoconf.h"; then enable_kernel_module="no" fi diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index 9513ab59f..44ec210d5 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -52,7 +52,6 @@ static void iattr2vattr(struct vattr *vattrp, struct iattr *iattrp); static int afs_root(struct super_block *afsp); struct super_block *afs_read_super(struct super_block *sb, void *data, int silent); int afs_fill_super(struct super_block *sb, void *data, int silent); -static struct super_block *afs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data); /* afs_file_system * VFS entry for Linux - installed in init_module @@ -67,6 +66,29 @@ struct backing_dev_info afs_backing_dev_info = { .state = 0, }; + +/* afs_read_super + * read the "super block" for AFS - roughly eguivalent to struct vfs. + * dev, covered, s_rd_only, s_dirt, and s_type will be set by read_super. + */ +#if defined(AFS_LINUX26_ENV) +static struct super_block * +#ifdef GET_SB_HAS_STRUCT_VFSMOUNT +afs_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data, struct vfsmount *mnt) +#else +afs_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data) +#endif +{ +#ifdef GET_SB_HAS_STRUCT_VFSMOUNT + return get_sb_nodev(fs_type, flags, data, afs_fill_super, mnt); +#else + return get_sb_nodev(fs_type, flags, data, afs_fill_super); +#endif +} + + struct file_system_type afs_fs_type = { .owner = THIS_MODULE, .name = "afs", @@ -86,16 +108,6 @@ struct file_system_type afs_fs_type = { }; #endif -/* afs_read_super - * read the "super block" for AFS - roughly eguivalent to struct vfs. - * dev, covered, s_rd_only, s_dirt, and s_type will be set by read_super. - */ -#if defined(AFS_LINUX26_ENV) -static struct super_block * -afs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) -{ - return get_sb_nodev(fs_type, flags, data, afs_fill_super); -} int afs_fill_super(struct super_block *sb, void *data, int silent) diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 48c139e05..aa3e10fe0 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -577,3 +577,13 @@ struct nameidata _nameidata; ac_cv_linux_func_d_revalidate_takes_nameidata=yes, ac_cv_linux_func_d_revalidate_takes_nameidata=no)]) AC_MSG_RESULT($ac_cv_linux_func_d_revalidate_takes_nameidata)]) + +AC_DEFUN([LINUX_GET_SB_HAS_STRUCT_VFSMOUNT], [ + AC_MSG_CHECKING([for struct vfsmount * in get_sb_nodev()]) + AC_CACHE_VAL([ac_cv_linux_get_sb_has_struct_vfsmount], [ + AC_TRY_KBUILD( +[#include ], +[get_sb_nodev(0,0,0,0,0);], + ac_cv_linux_get_sb_has_struct_vfsmount=yes, + ac_cv_linux_get_sb_has_struct_vfsmount=no)]) + AC_MSG_RESULT($ac_cv_linux_get_sb_has_struct_vfsmount)])