aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-06 15:37:36 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-06 15:37:36 -0400
commitd6e4a428eb8f92bbb3537ccabadfb1195efb432b (patch)
treeca408dbd20b38728412b58db5a6ec29aebbc0fe7 /fs/btrfs/disk-io.c
parent3eb0314dc1053b1ae617dcc8d6d93f776c5baa31 (diff)
Btrfs: start of support for many FS volumes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 5230554380d..b9301a5e460 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -338,7 +338,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
sb->s_blocksize);
if (!fs_info->sb_buffer) {
-printk("failed2\n");
return NULL;
}
disk_super = (struct btrfs_super_block *)fs_info->sb_buffer->b_data;
@@ -369,6 +368,10 @@ printk("failed2\n");
ret = btrfs_find_highest_inode(root, &root->fs_info->last_inode_alloc);
if (ret == 0)
fs_info->highest_inode = fs_info->last_inode_alloc;
+ memset(&fs_info->kobj, 0, sizeof(fs_info->kobj));
+ kobj_set_kset_s(fs_info, btrfs_subsys);
+ kobject_set_name(&fs_info->kobj, "%s", sb->s_id);
+ kobject_register(&fs_info->kobj);
mutex_unlock(&fs_info->fs_mutex);
return root;
}
@@ -430,7 +433,7 @@ int close_ctree(struct btrfs_root *root)
kfree(root->fs_info->extent_root);
kfree(root->fs_info->inode_root);
kfree(root->fs_info->tree_root);
- kfree(root->fs_info);
+ kobject_unregister(&root->fs_info->kobj);
kfree(root);
return 0;
}