diff options
Diffstat (limited to 'fs/hfsplus/inode.c')
-rw-r--r-- | fs/hfsplus/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 8cd8dc2e7fdd..0946e2cdca5e 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -190,7 +190,9 @@ static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dent | |||
190 | inode->i_ino = dir->i_ino; | 190 | inode->i_ino = dir->i_ino; |
191 | INIT_LIST_HEAD(&hip->open_dir_list); | 191 | INIT_LIST_HEAD(&hip->open_dir_list); |
192 | mutex_init(&hip->extents_lock); | 192 | mutex_init(&hip->extents_lock); |
193 | hip->flags = HFSPLUS_FLG_RSRC; | 193 | hip->extent_state = 0; |
194 | hip->flags = 0; | ||
195 | set_bit(HFSPLUS_I_RSRC, &hip->flags); | ||
194 | 196 | ||
195 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | 197 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); |
196 | err = hfsplus_find_cat(sb, dir->i_ino, &fd); | 198 | err = hfsplus_find_cat(sb, dir->i_ino, &fd); |
@@ -369,6 +371,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) | |||
369 | INIT_LIST_HEAD(&hip->open_dir_list); | 371 | INIT_LIST_HEAD(&hip->open_dir_list); |
370 | mutex_init(&hip->extents_lock); | 372 | mutex_init(&hip->extents_lock); |
371 | atomic_set(&hip->opencnt, 0); | 373 | atomic_set(&hip->opencnt, 0); |
374 | hip->extent_state = 0; | ||
372 | hip->flags = 0; | 375 | hip->flags = 0; |
373 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); | 376 | memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); |
374 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); | 377 | memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); |
@@ -498,8 +501,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
498 | hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, | 501 | hfs_bnode_read(fd->bnode, &entry, fd->entryoffset, |
499 | sizeof(struct hfsplus_cat_file)); | 502 | sizeof(struct hfsplus_cat_file)); |
500 | 503 | ||
501 | hfsplus_inode_read_fork(inode, HFSPLUS_IS_DATA(inode) ? | 504 | hfsplus_inode_read_fork(inode, HFSPLUS_IS_RSRC(inode) ? |
502 | &file->data_fork : &file->rsrc_fork); | 505 | &file->rsrc_fork : &file->data_fork); |
503 | hfsplus_get_perms(inode, &file->permissions, 0); | 506 | hfsplus_get_perms(inode, &file->permissions, 0); |
504 | inode->i_nlink = 1; | 507 | inode->i_nlink = 1; |
505 | if (S_ISREG(inode->i_mode)) { | 508 | if (S_ISREG(inode->i_mode)) { |