mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
linux-inotify-sem-20050413
FIXES 18260 add inotify sem detection
This commit is contained in:
parent
84d997e240
commit
0fb256419d
@ -570,6 +570,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
|||||||
LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST
|
LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST
|
||||||
LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
|
LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
|
||||||
LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK
|
LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK
|
||||||
|
LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM
|
||||||
LINUX_INODE_SETATTR_RETURN_TYPE
|
LINUX_INODE_SETATTR_RETURN_TYPE
|
||||||
LINUX_WRITE_INODE_RETURN_TYPE
|
LINUX_WRITE_INODE_RETURN_TYPE
|
||||||
LINUX_IOP_NAMEIDATA
|
LINUX_IOP_NAMEIDATA
|
||||||
|
@ -933,9 +933,13 @@ restart:
|
|||||||
#ifdef STRUCT_INODE_HAS_I_SB_LIST
|
#ifdef STRUCT_INODE_HAS_I_SB_LIST
|
||||||
list_add(&ip->i_sb_list, &ip->i_sb->s_inodes);
|
list_add(&ip->i_sb_list, &ip->i_sb->s_inodes);
|
||||||
#endif
|
#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);
|
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);
|
spin_lock_init(&ip->inotify_lock);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -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)
|
AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock)
|
||||||
CPPFLAGS="$save_CPPFLAGS"])
|
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_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
|
||||||
AC_MSG_CHECKING(for i_mapping_overload in struct inode)
|
AC_MSG_CHECKING(for i_mapping_overload in struct inode)
|
||||||
|
Loading…
Reference in New Issue
Block a user