linux-inotify-sem-20050413

FIXES 18260

add inotify sem detection
This commit is contained in:
Chaskiel M Grundman 2005-04-14 02:14:21 +00:00 committed by Derrick Brashear
parent 84d997e240
commit 0fb256419d
3 changed files with 21 additions and 1 deletions

View File

@ -570,6 +570,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST
LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK
LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM
LINUX_INODE_SETATTR_RETURN_TYPE
LINUX_WRITE_INODE_RETURN_TYPE
LINUX_IOP_NAMEIDATA

View File

@ -933,9 +933,13 @@ restart:
#ifdef STRUCT_INODE_HAS_I_SB_LIST
list_add(&ip->i_sb_list, &ip->i_sb->s_inodes);
#endif
#ifdef STRUCT_INODE_HAS_INOTIFY_LOCK
#if defined(STRUCT_INODE_HAS_INOTIFY_LOCK) || defined(STRUCT_INODE_HAS_INOTIFY_SEM)
INIT_LIST_HEAD(&ip->inotify_watches);
#if defined(STRUCT_INODE_HAS_INOTIFY_SEM)
sema_init(&ip->inotify_sem);
#else
spin_lock_init(&ip->inotify_lock);
#endif
#endif
}
#endif

View File

@ -251,6 +251,21 @@ ac_cv_linux_fs_struct_inode_has_inotify_lock=no)])
AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock)
CPPFLAGS="$save_CPPFLAGS"])
AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
AC_MSG_CHECKING(for inotify_sem in struct inode)
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem,
[
AC_TRY_COMPILE(
[#include <linux/fs.h>],
[struct inode _inode;
printf("%x\n", _inode.inotify_sem);],
ac_cv_linux_fs_struct_inode_has_inotify_sem=yes,
ac_cv_linux_fs_struct_inode_has_inotify_sem=no)])
AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_sem)
CPPFLAGS="$save_CPPFLAGS"])
AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
AC_MSG_CHECKING(for i_mapping_overload in struct inode)