diff options
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/hfs_fs.h | 13 | ||||
-rw-r--r-- | fs/hfs/inode.c | 2 | ||||
-rw-r--r-- | fs/hfs/mdb.c | 4 | ||||
-rw-r--r-- | fs/hfs/super.c | 7 |
4 files changed, 4 insertions, 22 deletions
diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index 4f55651aaa51..c8cffb81e849 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -147,8 +147,6 @@ struct hfs_sb_info { u16 blockoffset; int fs_div; - - struct hlist_head rsrc_inodes; }; #define HFS_FLG_BITMAP_DIRTY 0 @@ -254,17 +252,6 @@ static inline void hfs_bitmap_dirty(struct super_block *sb) sb->s_dirt = 1; } -static inline void hfs_buffer_sync(struct buffer_head *bh) -{ - while (buffer_locked(bh)) { - wait_on_buffer(bh); - } - if (buffer_dirty(bh)) { - ll_rw_block(WRITE, 1, &bh); - wait_on_buffer(bh); - } -} - #define sb_bread512(sb, sec, data) ({ \ struct buffer_head *__bh; \ sector_t __block; \ diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 397b7adc7ce6..dffb4e996643 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -524,7 +524,7 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry, HFS_I(inode)->rsrc_inode = dir; HFS_I(dir)->rsrc_inode = inode; igrab(dir); - hlist_add_head(&inode->i_hash, &HFS_SB(dir->i_sb)->rsrc_inodes); + hlist_add_fake(&inode->i_hash); mark_inode_dirty(inode); out: d_add(dentry, inode); diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index 86428f5ac991..1563d5ce5764 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -220,7 +220,7 @@ int hfs_mdb_get(struct super_block *sb) mdb->drLsMod = hfs_mtime(); mark_buffer_dirty(HFS_SB(sb)->mdb_bh); - hfs_buffer_sync(HFS_SB(sb)->mdb_bh); + sync_dirty_buffer(HFS_SB(sb)->mdb_bh); } return 0; @@ -287,7 +287,7 @@ void hfs_mdb_commit(struct super_block *sb) HFS_SB(sb)->alt_mdb->drAtrb |= cpu_to_be16(HFS_SB_ATTRIB_UNMNT); HFS_SB(sb)->alt_mdb->drAtrb &= cpu_to_be16(~HFS_SB_ATTRIB_INCNSTNT); mark_buffer_dirty(HFS_SB(sb)->alt_mdb_bh); - hfs_buffer_sync(HFS_SB(sb)->alt_mdb_bh); + sync_dirty_buffer(HFS_SB(sb)->alt_mdb_bh); } if (test_and_clear_bit(HFS_FLG_BITMAP_DIRTY, &HFS_SB(sb)->flags)) { diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 34235d4bf08b..6ee1586f2334 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -20,7 +20,6 @@ #include <linux/parser.h> #include <linux/seq_file.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include <linux/vfs.h> #include "hfs_fs.h" @@ -79,15 +78,11 @@ static int hfs_sync_fs(struct super_block *sb, int wait) */ static void hfs_put_super(struct super_block *sb) { - lock_kernel(); - if (sb->s_dirt) hfs_write_super(sb); hfs_mdb_close(sb); /* release the MDB's resources */ hfs_mdb_put(sb); - - unlock_kernel(); } /* @@ -385,8 +380,8 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); if (!sbi) return -ENOMEM; + sb->s_fs_info = sbi; - INIT_HLIST_HEAD(&sbi->rsrc_inodes); res = -EINVAL; if (!parse_options((char *)data, sbi)) { |