diff options
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/bfind.c | 4 | ||||
-rw-r--r-- | fs/hfs/btree.c | 2 | ||||
-rw-r--r-- | fs/hfs/btree.h | 2 | ||||
-rw-r--r-- | fs/hfs/super.c | 6 |
4 files changed, 5 insertions, 9 deletions
diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c index 4129cdb3f0d8..571abe97b42a 100644 --- a/fs/hfs/bfind.c +++ b/fs/hfs/bfind.c | |||
@@ -23,7 +23,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) | |||
23 | fd->search_key = ptr; | 23 | fd->search_key = ptr; |
24 | fd->key = ptr + tree->max_key_len + 2; | 24 | fd->key = ptr + tree->max_key_len + 2; |
25 | dprint(DBG_BNODE_REFS, "find_init: %d (%p)\n", tree->cnid, __builtin_return_address(0)); | 25 | dprint(DBG_BNODE_REFS, "find_init: %d (%p)\n", tree->cnid, __builtin_return_address(0)); |
26 | down(&tree->tree_lock); | 26 | mutex_lock(&tree->tree_lock); |
27 | return 0; | 27 | return 0; |
28 | } | 28 | } |
29 | 29 | ||
@@ -32,7 +32,7 @@ void hfs_find_exit(struct hfs_find_data *fd) | |||
32 | hfs_bnode_put(fd->bnode); | 32 | hfs_bnode_put(fd->bnode); |
33 | kfree(fd->search_key); | 33 | kfree(fd->search_key); |
34 | dprint(DBG_BNODE_REFS, "find_exit: %d (%p)\n", fd->tree->cnid, __builtin_return_address(0)); | 34 | dprint(DBG_BNODE_REFS, "find_exit: %d (%p)\n", fd->tree->cnid, __builtin_return_address(0)); |
35 | up(&fd->tree->tree_lock); | 35 | mutex_unlock(&fd->tree->tree_lock); |
36 | fd->tree = NULL; | 36 | fd->tree = NULL; |
37 | } | 37 | } |
38 | 38 | ||
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 38a0a9917d7f..3ebc437736fe 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -27,7 +27,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
27 | if (!tree) | 27 | if (!tree) |
28 | return NULL; | 28 | return NULL; |
29 | 29 | ||
30 | init_MUTEX(&tree->tree_lock); | 30 | mutex_init(&tree->tree_lock); |
31 | spin_lock_init(&tree->hash_lock); | 31 | spin_lock_init(&tree->hash_lock); |
32 | /* Set the correct compare function */ | 32 | /* Set the correct compare function */ |
33 | tree->sb = sb; | 33 | tree->sb = sb; |
diff --git a/fs/hfs/btree.h b/fs/hfs/btree.h index cc51905ac21d..2a1d712f85dc 100644 --- a/fs/hfs/btree.h +++ b/fs/hfs/btree.h | |||
@@ -33,7 +33,7 @@ struct hfs_btree { | |||
33 | unsigned int depth; | 33 | unsigned int depth; |
34 | 34 | ||
35 | //unsigned int map1_size, map_size; | 35 | //unsigned int map1_size, map_size; |
36 | struct semaphore tree_lock; | 36 | struct mutex tree_lock; |
37 | 37 | ||
38 | unsigned int pages_per_bnode; | 38 | unsigned int pages_per_bnode; |
39 | spinlock_t hash_lock; | 39 | spinlock_t hash_lock; |
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 34235d4bf08b..33254160f650 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/parser.h> | 20 | #include <linux/parser.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/smp_lock.h> | ||
24 | #include <linux/vfs.h> | 23 | #include <linux/vfs.h> |
25 | 24 | ||
26 | #include "hfs_fs.h" | 25 | #include "hfs_fs.h" |
@@ -79,15 +78,11 @@ static int hfs_sync_fs(struct super_block *sb, int wait) | |||
79 | */ | 78 | */ |
80 | static void hfs_put_super(struct super_block *sb) | 79 | static void hfs_put_super(struct super_block *sb) |
81 | { | 80 | { |
82 | lock_kernel(); | ||
83 | |||
84 | if (sb->s_dirt) | 81 | if (sb->s_dirt) |
85 | hfs_write_super(sb); | 82 | hfs_write_super(sb); |
86 | hfs_mdb_close(sb); | 83 | hfs_mdb_close(sb); |
87 | /* release the MDB's resources */ | 84 | /* release the MDB's resources */ |
88 | hfs_mdb_put(sb); | 85 | hfs_mdb_put(sb); |
89 | |||
90 | unlock_kernel(); | ||
91 | } | 86 | } |
92 | 87 | ||
93 | /* | 88 | /* |
@@ -385,6 +380,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
385 | sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); | 380 | sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); |
386 | if (!sbi) | 381 | if (!sbi) |
387 | return -ENOMEM; | 382 | return -ENOMEM; |
383 | |||
388 | sb->s_fs_info = sbi; | 384 | sb->s_fs_info = sbi; |
389 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); | 385 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); |
390 | 386 | ||