linux26-inode-got-i-sb-list-20050204
authorChas Williams <chas@cmf.nrl.navy.mil>
Fri, 4 Feb 2005 21:13:51 +0000 (21:13 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 4 Feb 2005 21:13:51 +0000 (21:13 +0000)
another thing to do at inode initialization

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

index c7b1a3a..e007976 100644 (file)
@@ -566,6 +566,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
+                LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST
                 LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
                 LINUX_INODE_SETATTR_RETURN_TYPE
                 LINUX_WRITE_INODE_RETURN_TYPE
index efc7503..a94e5e5 100644 (file)
@@ -952,6 +952,9 @@ restart:
 #endif
        ip->i_sb = afs_globalVFS;
        put_inode_on_dummy_list(ip);
+#ifdef STRUCT_INODE_HAS_I_SB_LIST
+       list_add(&ip->i_sb_list, &ip->i_sb->s_inodes);
+#endif
     }
 #endif
 
index 9f30bec..4da0611 100644 (file)
@@ -284,6 +284,22 @@ AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_security)
 CPPFLAGS="$save_CPPFLAGS"])
 
 
+AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
+AC_MSG_CHECKING(for i_sb_list 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_i_sb_list, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.i_sb_list);], 
+ac_cv_linux_fs_struct_inode_has_i_sb_list=yes,
+ac_cv_linux_fs_struct_inode_has_i_sb_list=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_sb_list)
+CPPFLAGS="$save_CPPFLAGS"])
+
+
 AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE],[
 AC_MSG_CHECKING(for recalc_sigpending arg type)
 save_CPPFLAGS="$CPPFLAGS"