-# LC_EXPORT_SYNCHRONIZE_RCU
-# after 2.6.12 synchronize_rcu is preferred over synchronize_kernel
-AC_DEFUN([LC_EXPORT_SYNCHRONIZE_RCU],
-[LB_CHECK_SYMBOL_EXPORT([synchronize_rcu],
-[kernel/rcupdate.c],[
- AC_DEFINE(HAVE_SYNCHRONIZE_RCU, 1,
- [in 2.6.12 synchronize_rcu preferred over synchronize_kernel])
-],[
-])
-])
-
-# 2.6.15
-
-# LC_INODE_I_MUTEX
-# after 2.6.15 inode have i_mutex intead of i_sem
-AC_DEFUN([LC_INODE_I_MUTEX],
-[AC_MSG_CHECKING([if inode has i_mutex ])
-LB_LINUX_TRY_COMPILE([
- #include <linux/mutex.h>
- #include <linux/fs.h>
- #undef i_mutex
-],[
- struct inode i;
-
- mutex_unlock(&i.i_mutex);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_INODE_I_MUTEX, 1,
- [after 2.6.15 inode have i_mutex intead of i_sem])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-# 2.6.16
-
-# LC_SECURITY_PLUG # for SLES10 SP2
-# check security plug in sles10 sp2 kernel
-AC_DEFUN([LC_SECURITY_PLUG],
-[AC_MSG_CHECKING([If kernel has security plug support])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct dentry *dentry;
- struct vfsmount *mnt;
- struct iattr *iattr;
-
- notify_change(dentry, mnt, iattr);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SECURITY_PLUG, 1,
- [SLES10 SP2 use extra parameter in vfs])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-# 2.6.17
-
-# inode have i_private field since 2.6.17
-AC_DEFUN([LC_INODE_IPRIVATE],
-[AC_MSG_CHECKING([if inode has a i_private field])
-LB_LINUX_TRY_COMPILE([
-#include <linux/fs.h>
-],[
- struct inode i;
- i.i_private = NULL;
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_INODE_IPRIVATE, 1,
- [struct inode has i_private field])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-# LC_DQUOTOFF_MUTEX
-# after 2.6.17 dquote use mutex instead if semaphore
-AC_DEFUN([LC_DQUOTOFF_MUTEX],
-[AC_MSG_CHECKING([use dqonoff_mutex])
-LB_LINUX_TRY_COMPILE([
- #include <linux/mutex.h>
- #include <linux/fs.h>
- #include <linux/quota.h>
-],[
- struct quota_info dq;
-
- mutex_unlock(&dq.dqonoff_mutex);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1,
- [after 2.6.17 dquote use mutex instead if semaphore])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-# 2.6.18
-
-# LC_NR_PAGECACHE
-# 2.6.18 don't export nr_pagecahe
-AC_DEFUN([LC_NR_PAGECACHE],
-[AC_MSG_CHECKING([kernel export nr_pagecache])
-LB_LINUX_TRY_COMPILE([
- #include <linux/pagemap.h>
-],[
- return atomic_read(&nr_pagecache);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_NR_PAGECACHE, 1,
- [is kernel export nr_pagecache])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-#
-# LC_STATFS_DENTRY_PARAM
-# starting from 2.6.18 linux kernel uses dentry instead of super_block
-# for the first parameter of the super_operations->statfs() callback.
-#
-#
-AC_DEFUN([LC_STATFS_DENTRY_PARAM],
-[AC_MSG_CHECKING([if super_ops.statfs() first parameter is dentry])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct super_operations *sop = NULL;
- sop->statfs((struct dentry *)0, (struct kstatfs*)0);
-],[
- AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1,
- [super_ops.statfs() first parameter is dentry])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-#
-# LC_VFS_KERN_MOUNT
-# starting from 2.6.18 kernel don't export do_kern_mount
-# and want to use vfs_kern_mount instead.
-#
-AC_DEFUN([LC_VFS_KERN_MOUNT],
-[AC_MSG_CHECKING([vfs_kern_mount exist in kernel])
-LB_LINUX_TRY_COMPILE([
- #include <linux/mount.h>
-],[
- vfs_kern_mount(NULL, 0, NULL, NULL);
-],[
- AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1,
- [vfs_kern_mount exist in kernel])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_INVALIDATEPAGE_RETURN_INT
-# 2.6.17 changes return type for invalidatepage to 'void' from 'int'
-#
-AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT],
-[AC_MSG_CHECKING([invalidatepage has return int])
-LB_LINUX_TRY_COMPILE([
- #include <linux/buffer_head.h>
-],[
- int rc = block_invalidatepage(NULL, 0);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1,
- [Define if return type of invalidatepage should be int])
-],[
- AC_MSG_RESULT(no)
-])
-])
-