aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-08 22:15:13 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:35 -0400
commit48fde701aff662559b38d9a609574068f22d00fe (patch)
treeaa6b203dc671b51d58575b65eb08310ff8309b60 /fs/btrfs
parent6b4231e2f92adbcf96fb2a3fa751d7ca0a61b21f (diff)
switch open-coded instances of d_make_root() to new helper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/super.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3ce97b217cbe..81df3fec6a6d 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -629,7 +629,6 @@ static int btrfs_fill_super(struct super_block *sb,
629 void *data, int silent) 629 void *data, int silent)
630{ 630{
631 struct inode *inode; 631 struct inode *inode;
632 struct dentry *root_dentry;
633 struct btrfs_fs_info *fs_info = btrfs_sb(sb); 632 struct btrfs_fs_info *fs_info = btrfs_sb(sb);
634 struct btrfs_key key; 633 struct btrfs_key key;
635 int err; 634 int err;
@@ -660,15 +659,12 @@ static int btrfs_fill_super(struct super_block *sb,
660 goto fail_close; 659 goto fail_close;
661 } 660 }
662 661
663 root_dentry = d_alloc_root(inode); 662 sb->s_root = d_make_root(inode);
664 if (!root_dentry) { 663 if (!sb->s_root) {
665 iput(inode);
666 err = -ENOMEM; 664 err = -ENOMEM;
667 goto fail_close; 665 goto fail_close;
668 } 666 }
669 667
670 sb->s_root = root_dentry;
671
672 save_mount_options(sb, data); 668 save_mount_options(sb, data);
673 cleancache_init_fs(sb); 669 cleancache_init_fs(sb);
674 sb->s_flags |= MS_ACTIVE; 670 sb->s_flags |= MS_ACTIVE;