diff options
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r-- | fs/hfsplus/super.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index acaef57e3606..2c1a72287fb5 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -73,11 +73,13 @@ struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino) | |||
73 | 73 | ||
74 | if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID || | 74 | if (inode->i_ino >= HFSPLUS_FIRSTUSER_CNID || |
75 | inode->i_ino == HFSPLUS_ROOT_CNID) { | 75 | inode->i_ino == HFSPLUS_ROOT_CNID) { |
76 | hfs_find_init(HFSPLUS_SB(inode->i_sb)->cat_tree, &fd); | 76 | err = hfs_find_init(HFSPLUS_SB(inode->i_sb)->cat_tree, &fd); |
77 | err = hfsplus_find_cat(inode->i_sb, inode->i_ino, &fd); | 77 | if (!err) { |
78 | if (!err) | 78 | err = hfsplus_find_cat(inode->i_sb, inode->i_ino, &fd); |
79 | err = hfsplus_cat_read_inode(inode, &fd); | 79 | if (!err) |
80 | hfs_find_exit(&fd); | 80 | err = hfsplus_cat_read_inode(inode, &fd); |
81 | hfs_find_exit(&fd); | ||
82 | } | ||
81 | } else { | 83 | } else { |
82 | err = hfsplus_system_read_inode(inode); | 84 | err = hfsplus_system_read_inode(inode); |
83 | } | 85 | } |
@@ -456,7 +458,9 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
456 | 458 | ||
457 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; | 459 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; |
458 | str.name = HFSP_HIDDENDIR_NAME; | 460 | str.name = HFSP_HIDDENDIR_NAME; |
459 | hfs_find_init(sbi->cat_tree, &fd); | 461 | err = hfs_find_init(sbi->cat_tree, &fd); |
462 | if (err) | ||
463 | goto out_put_root; | ||
460 | hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str); | 464 | hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str); |
461 | if (!hfs_brec_read(&fd, &entry, sizeof(entry))) { | 465 | if (!hfs_brec_read(&fd, &entry, sizeof(entry))) { |
462 | hfs_find_exit(&fd); | 466 | hfs_find_exit(&fd); |