diff options
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/bnode.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/btree.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 3 |
4 files changed, 3 insertions, 8 deletions
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 77bf434da679..29da6574ba77 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c | |||
@@ -409,10 +409,9 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) | |||
409 | sb = tree->inode->i_sb; | 409 | sb = tree->inode->i_sb; |
410 | size = sizeof(struct hfs_bnode) + tree->pages_per_bnode * | 410 | size = sizeof(struct hfs_bnode) + tree->pages_per_bnode * |
411 | sizeof(struct page *); | 411 | sizeof(struct page *); |
412 | node = kmalloc(size, GFP_KERNEL); | 412 | node = kzalloc(size, GFP_KERNEL); |
413 | if (!node) | 413 | if (!node) |
414 | return NULL; | 414 | return NULL; |
415 | memset(node, 0, size); | ||
416 | node->tree = tree; | 415 | node->tree = tree; |
417 | node->this = cnid; | 416 | node->this = cnid; |
418 | set_bit(HFS_BNODE_NEW, &node->flags); | 417 | set_bit(HFS_BNODE_NEW, &node->flags); |
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index cfc852fdd1b5..a9b9e872e29a 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -24,10 +24,9 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) | |||
24 | struct page *page; | 24 | struct page *page; |
25 | unsigned int size; | 25 | unsigned int size; |
26 | 26 | ||
27 | tree = kmalloc(sizeof(*tree), GFP_KERNEL); | 27 | tree = kzalloc(sizeof(*tree), GFP_KERNEL); |
28 | if (!tree) | 28 | if (!tree) |
29 | return NULL; | 29 | return NULL; |
30 | memset(tree, 0, sizeof(*tree)); | ||
31 | 30 | ||
32 | init_MUTEX(&tree->tree_lock); | 31 | init_MUTEX(&tree->tree_lock); |
33 | spin_lock_init(&tree->hash_lock); | 32 | spin_lock_init(&tree->hash_lock); |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 924ecdef8091..0eb1a6092668 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -304,7 +304,6 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) | |||
304 | inode->i_gid = current->fsgid; | 304 | inode->i_gid = current->fsgid; |
305 | inode->i_nlink = 1; | 305 | inode->i_nlink = 1; |
306 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; | 306 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; |
307 | inode->i_blksize = HFSPLUS_SB(sb).alloc_blksz; | ||
308 | INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list); | 307 | INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list); |
309 | init_MUTEX(&HFSPLUS_I(inode).extents_lock); | 308 | init_MUTEX(&HFSPLUS_I(inode).extents_lock); |
310 | atomic_set(&HFSPLUS_I(inode).opencnt, 0); | 309 | atomic_set(&HFSPLUS_I(inode).opencnt, 0); |
@@ -407,7 +406,6 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
407 | type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset); | 406 | type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset); |
408 | 407 | ||
409 | HFSPLUS_I(inode).dev = 0; | 408 | HFSPLUS_I(inode).dev = 0; |
410 | inode->i_blksize = HFSPLUS_SB(inode->i_sb).alloc_blksz; | ||
411 | if (type == HFSPLUS_FOLDER) { | 409 | if (type == HFSPLUS_FOLDER) { |
412 | struct hfsplus_cat_folder *folder = &entry.folder; | 410 | struct hfsplus_cat_folder *folder = &entry.folder; |
413 | 411 | ||
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index d279d5924f28..194eede52fa4 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -493,8 +493,7 @@ static int __init init_hfsplus_fs(void) | |||
493 | static void __exit exit_hfsplus_fs(void) | 493 | static void __exit exit_hfsplus_fs(void) |
494 | { | 494 | { |
495 | unregister_filesystem(&hfsplus_fs_type); | 495 | unregister_filesystem(&hfsplus_fs_type); |
496 | if (kmem_cache_destroy(hfsplus_inode_cachep)) | 496 | kmem_cache_destroy(hfsplus_inode_cachep); |
497 | printk(KERN_ERR "hfsplus_inode_cache: not all structures were freed\n"); | ||
498 | } | 497 | } |
499 | 498 | ||
500 | module_init(init_hfsplus_fs) | 499 | module_init(init_hfsplus_fs) |