linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / jfs / jfs_incore.h
index 5496bfb..dc21a5b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <linux/rwsem.h>
 #include <linux/slab.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include "jfs_types.h"
 #include "jfs_xtree.h"
 #include "jfs_dtree.h"
@@ -58,7 +58,7 @@ struct jfs_inode_info {
        /*
         * rdwrlock serializes xtree between reads & writes and synchronizes
         * changes to special inodes.  It's use would be redundant on
-        * directories since the i_sem taken in the VFS is sufficient.
+        * directories since the i_mutex taken in the VFS is sufficient.
         */
        struct rw_semaphore rdwrlock;
        /*
@@ -68,7 +68,7 @@ struct jfs_inode_info {
         * inode is blocked in txBegin or TxBeginAnon
         */
        struct semaphore commit_sem;
-       /* xattr_sem allows us to access the xattrs without taking i_sem */
+       /* xattr_sem allows us to access the xattrs without taking i_mutex */
        struct rw_semaphore xattr_sem;
        lid_t   xtlid;          /* lid of xtree lock on directory */
 #ifdef CONFIG_JFS_POSIX_ACL
@@ -165,6 +165,7 @@ struct jfs_sb_info {
         /* Formerly in ipbmap */
        struct bmap     *bmap;          /* incore bmap descriptor       */
        struct nls_table *nls_tab;      /* current codepage             */
+       struct inode *direct_inode;     /* metadata inode */
        uint            state;          /* mount/recovery state */
        unsigned long   flag;           /* mount time flags */
        uint            p_state;        /* state prior to going no integrity */
@@ -178,6 +179,11 @@ static inline struct jfs_inode_info *JFS_IP(struct inode *inode)
        return list_entry(inode, struct jfs_inode_info, vfs_inode);
 }
 
+static inline int jfs_dirtable_inline(struct inode *inode)
+{
+       return (JFS_IP(inode)->next_index <= (MAX_INLINE_DIRTABLE_ENTRY + 1));
+}
+
 static inline struct jfs_sb_info *JFS_SBI(struct super_block *sb)
 {
        return sb->s_fs_info;
@@ -189,5 +195,4 @@ static inline int isReadOnly(struct inode *inode)
                return 0;
        return 1;
 }
-
 #endif /* _H_JFS_INCORE */