hfsplus: do not cache and write next_alloc
[pandora-kernel.git] / fs / hfsplus / hfsplus_fs.h
index dc856be..5e2418a 100644 (file)
@@ -116,6 +116,9 @@ struct hfsplus_sb_info {
        struct inode *hidden_dir;
        struct nls_table *nls;
 
+       /* synchronize block allocations */
+       struct mutex alloc_mutex;
+
        /* Runtime variables */
        u32 blockoffset;
        u32 sect_count;
@@ -126,7 +129,6 @@ struct hfsplus_sb_info {
        int alloc_blksz_shift;
        u32 total_blocks;
        u32 free_blocks;
-       u32 next_alloc;
        u32 next_cnid;
        u32 file_count;
        u32 folder_count;
@@ -184,8 +186,8 @@ struct hfsplus_inode_info {
 #define HFSPLUS_FLG_EXT_DIRTY  0x0002
 #define HFSPLUS_FLG_EXT_NEW    0x0004
 
-#define HFSPLUS_IS_DATA(inode)   (!(HFSPLUS_I(inode).flags & HFSPLUS_FLG_RSRC))
-#define HFSPLUS_IS_RSRC(inode)   (HFSPLUS_I(inode).flags & HFSPLUS_FLG_RSRC)
+#define HFSPLUS_IS_DATA(inode)   (!(HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC))
+#define HFSPLUS_IS_RSRC(inode)   (HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC)
 
 struct hfs_find_data {
        /* filled by caller */
@@ -372,18 +374,15 @@ int hfsplus_read_wrapper(struct super_block *);
 int hfs_part_find(struct super_block *, sector_t *, sector_t *);
 
 /* access macros */
-/*
 static inline struct hfsplus_sb_info *HFSPLUS_SB(struct super_block *sb)
 {
        return sb->s_fs_info;
 }
+
 static inline struct hfsplus_inode_info *HFSPLUS_I(struct inode *inode)
 {
        return list_entry(inode, struct hfsplus_inode_info, vfs_inode);
 }
-*/
-#define HFSPLUS_SB(super)      (*(struct hfsplus_sb_info *)(super)->s_fs_info)
-#define HFSPLUS_I(inode)       (*list_entry(inode, struct hfsplus_inode_info, vfs_inode))
 
 #if 1
 #define hfsplus_kmap(p)                ({ struct page *__p = (p); kmap(__p); })