diff options
Diffstat (limited to 'fs/hfs/btree.c')
-rw-r--r-- | fs/hfs/btree.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 9b9d6395bad3..052f214ea6f0 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -58,6 +58,11 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
58 | } | 58 | } |
59 | unlock_new_inode(tree->inode); | 59 | unlock_new_inode(tree->inode); |
60 | 60 | ||
61 | if (!HFS_I(tree->inode)->first_blocks) { | ||
62 | printk(KERN_ERR "hfs: invalid btree extent records (0 size).\n"); | ||
63 | goto free_inode; | ||
64 | } | ||
65 | |||
61 | mapping = tree->inode->i_mapping; | 66 | mapping = tree->inode->i_mapping; |
62 | page = read_mapping_page(mapping, 0, NULL); | 67 | page = read_mapping_page(mapping, 0, NULL); |
63 | if (IS_ERR(page)) | 68 | if (IS_ERR(page)) |