diff options
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r-- | fs/hfsplus/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index ebd1b380cbbc..6d87a2a9534d 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
283 | struct nls_table *nls = NULL; | 283 | struct nls_table *nls = NULL; |
284 | int err = -EINVAL; | 284 | int err = -EINVAL; |
285 | 285 | ||
286 | sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL); | 286 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
287 | if (!sbi) | 287 | if (!sbi) |
288 | return -ENOMEM; | 288 | return -ENOMEM; |
289 | 289 | ||
290 | memset(sbi, 0, sizeof(HFSPLUS_SB(sb))); | ||
291 | sb->s_fs_info = sbi; | 290 | sb->s_fs_info = sbi; |
292 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); | 291 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); |
293 | hfsplus_fill_defaults(sbi); | 292 | hfsplus_fill_defaults(sbi); |
@@ -381,6 +380,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
381 | iput(root); | 380 | iput(root); |
382 | goto cleanup; | 381 | goto cleanup; |
383 | } | 382 | } |
383 | sb->s_root->d_op = &hfsplus_dentry_operations; | ||
384 | 384 | ||
385 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; | 385 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; |
386 | str.name = HFSP_HIDDENDIR_NAME; | 386 | str.name = HFSP_HIDDENDIR_NAME; |