diff options
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r-- | fs/hfsplus/super.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 52cc746d3ba3..ddf712e4700e 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -419,7 +419,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
419 | err = -ENOMEM; | 419 | err = -ENOMEM; |
420 | goto cleanup; | 420 | goto cleanup; |
421 | } | 421 | } |
422 | sb->s_root->d_op = &hfsplus_dentry_operations; | 422 | d_set_d_op(sb->s_root, &hfsplus_dentry_operations); |
423 | 423 | ||
424 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; | 424 | str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; |
425 | str.name = HFSP_HIDDENDIR_NAME; | 425 | str.name = HFSP_HIDDENDIR_NAME; |
@@ -488,11 +488,19 @@ static struct inode *hfsplus_alloc_inode(struct super_block *sb) | |||
488 | return i ? &i->vfs_inode : NULL; | 488 | return i ? &i->vfs_inode : NULL; |
489 | } | 489 | } |
490 | 490 | ||
491 | static void hfsplus_destroy_inode(struct inode *inode) | 491 | static void hfsplus_i_callback(struct rcu_head *head) |
492 | { | 492 | { |
493 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
494 | |||
495 | INIT_LIST_HEAD(&inode->i_dentry); | ||
493 | kmem_cache_free(hfsplus_inode_cachep, HFSPLUS_I(inode)); | 496 | kmem_cache_free(hfsplus_inode_cachep, HFSPLUS_I(inode)); |
494 | } | 497 | } |
495 | 498 | ||
499 | static void hfsplus_destroy_inode(struct inode *inode) | ||
500 | { | ||
501 | call_rcu(&inode->i_rcu, hfsplus_i_callback); | ||
502 | } | ||
503 | |||
496 | #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) | 504 | #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) |
497 | 505 | ||
498 | static struct dentry *hfsplus_mount(struct file_system_type *fs_type, | 506 | static struct dentry *hfsplus_mount(struct file_system_type *fs_type, |