Skip to content

Commit 467c3d9

Browse files
KAGA-KOKOChristoph Hellwig
authored andcommitted
hfsplus: convert tree_lock to mutex
tree_lock is used as mutex so make it a mutex. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Christoph Hellwig <hch@tuxera.com>
1 parent 7fcc99f commit 467c3d9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎fs/hfsplus/bfind.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
2323
fd->search_key = ptr;
2424
fd->key = ptr + tree->max_key_len + 2;
2525
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);
2727
return 0;
2828
}
2929

@@ -32,7 +32,7 @@ void hfs_find_exit(struct hfs_find_data *fd)
3232
hfs_bnode_put(fd->bnode);
3333
kfree(fd->search_key);
3434
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);
3636
fd->tree = NULL;
3737
}
3838

‎fs/hfsplus/btree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
3030
if (!tree)
3131
return NULL;
3232

33-
init_MUTEX(&tree->tree_lock);
33+
mutex_init(&tree->tree_lock);
3434
spin_lock_init(&tree->hash_lock);
3535
tree->sb = sb;
3636
tree->cnid = id;

‎fs/hfsplus/hfsplus_fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct hfs_btree {
6262
unsigned int depth;
6363

6464
//unsigned int map1_size, map_size;
65-
struct semaphore tree_lock;
65+
struct mutex tree_lock;
6666

6767
unsigned int pages_per_bnode;
6868
spinlock_t hash_lock;

0 commit comments

Comments
 (0)