aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-02-12 22:07:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:36 -0400
commit68acb8e60d672cba0fd1d3545ba33343931c7a24 (patch)
tree4f380f329111fdf55cac5f3ffff199078a574bd3 /fs/hfsplus
parent1688f86046e5572623b2eacb685eb707fe21fb0a (diff)
hfsplus: switch to d_make_root()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/super.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 427682ca9e48..ceb1c281eefb 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -465,6 +465,13 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
465 goto out_put_alloc_file; 465 goto out_put_alloc_file;
466 } 466 }
467 467
468 sb->s_d_op = &hfsplus_dentry_operations;
469 sb->s_root = d_make_root(root);
470 if (!sb->s_root) {
471 err = -ENOMEM;
472 goto out_put_alloc_file;
473 }
474
468 str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; 475 str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1;
469 str.name = HFSP_HIDDENDIR_NAME; 476 str.name = HFSP_HIDDENDIR_NAME;
470 err = hfs_find_init(sbi->cat_tree, &fd); 477 err = hfs_find_init(sbi->cat_tree, &fd);
@@ -515,13 +522,6 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
515 } 522 }
516 } 523 }
517 524
518 sb->s_d_op = &hfsplus_dentry_operations;
519 sb->s_root = d_alloc_root(root);
520 if (!sb->s_root) {
521 err = -ENOMEM;
522 goto out_put_hidden_dir;
523 }
524
525 unload_nls(sbi->nls); 525 unload_nls(sbi->nls);
526 sbi->nls = nls; 526 sbi->nls = nls;
527 return 0; 527 return 0;
@@ -529,7 +529,8 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
529out_put_hidden_dir: 529out_put_hidden_dir:
530 iput(sbi->hidden_dir); 530 iput(sbi->hidden_dir);
531out_put_root: 531out_put_root:
532 iput(root); 532 dput(sb->s_root);
533 sb->s_root = NULL;
533out_put_alloc_file: 534out_put_alloc_file:
534 iput(sbi->alloc_file); 535 iput(sbi->alloc_file);
535out_close_cat_tree: 536out_close_cat_tree: