diff options
Diffstat (limited to 'fs/hfsplus/btree.c')
-rw-r--r-- | fs/hfsplus/btree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 050d29c0a5b5..bb5433608a42 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -22,6 +22,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) | |||
22 | struct hfs_btree *tree; | 22 | struct hfs_btree *tree; |
23 | struct hfs_btree_header_rec *head; | 23 | struct hfs_btree_header_rec *head; |
24 | struct address_space *mapping; | 24 | struct address_space *mapping; |
25 | struct inode *inode; | ||
25 | struct page *page; | 26 | struct page *page; |
26 | unsigned int size; | 27 | unsigned int size; |
27 | 28 | ||
@@ -33,9 +34,10 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) | |||
33 | spin_lock_init(&tree->hash_lock); | 34 | spin_lock_init(&tree->hash_lock); |
34 | tree->sb = sb; | 35 | tree->sb = sb; |
35 | tree->cnid = id; | 36 | tree->cnid = id; |
36 | tree->inode = iget(sb, id); | 37 | inode = hfsplus_iget(sb, id); |
37 | if (!tree->inode) | 38 | if (IS_ERR(inode)) |
38 | goto free_tree; | 39 | goto free_tree; |
40 | tree->inode = inode; | ||
39 | 41 | ||
40 | mapping = tree->inode->i_mapping; | 42 | mapping = tree->inode->i_mapping; |
41 | page = read_mapping_page(mapping, 0, NULL); | 43 | page = read_mapping_page(mapping, 0, NULL); |