]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-linux-inotify-20050320
authorDerrick Brashear <shadow@dementia.org>
Sun, 20 Mar 2005 20:38:48 +0000 (20:38 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 20 Mar 2005 20:38:48 +0000 (20:38 +0000)
yay more inode fields.

(cherry picked from commit 6650b683bf999293d3473d0f7e2dd3fd4dc0daf7)

acinclude.m4
src/afs/afs_vcache.c
src/cf/linux-test4.m4

index 2d041795c3a81a77b86e17e0582c678b89bede89..fb5909c683c6bba084b5ae9716855ca55052641e 100644 (file)
@@ -571,6 +571,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST
                 LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
+                LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK
                 LINUX_INODE_SETATTR_RETURN_TYPE
                 LINUX_WRITE_INODE_RETURN_TYPE
                 LINUX_IOP_NAMEIDATA
@@ -690,6 +691,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers])
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_inotify_lock" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_INOTIFY_LOCK, 1, [define if your struct inode has inotify_lock])
+                fi
                 if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then 
                  AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void])
                 fi
index be1fc0bd045439354975c4d5de5ccb1d813310c0..3eb083013cf10813d8b51b965b541394f8758a51 100644 (file)
@@ -957,6 +957,10 @@ 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
+       INIT_LIST_HEAD(&inode->inotify_watches); 
+       spin_lock_init(&inode->inotify_lock); 
+#endif 
     }
 #endif
 
index 4da0611b00a6ba12628c8f878fa79e9e0fdca62f..fa80d54c52f1003d419bc5dd05e4b1fd4ea87931 100644 (file)
@@ -236,6 +236,22 @@ AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers)
 CPPFLAGS="$save_CPPFLAGS"])
 
 
+AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
+AC_MSG_CHECKING(for inotify_lock 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_lock, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.inotify_lock);], 
+ac_cv_linux_fs_struct_inode_has_inotify_lock=yes,
+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_I_MAPPING_OVERLOAD], [
 AC_MSG_CHECKING(for i_mapping_overload in struct inode)
 save_CPPFLAGS="$CPPFLAGS"