fs_info->generation = btrfs_super_generation(disk_super) + 1;
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 tree_root;
}
#include "btrfs_inode.h"
#include "ioctl.h"
-static void btrfs_fsinfo_release(struct kobject *obj)
-{
- struct btrfs_fs_info *fsinfo = container_of(obj,
- struct btrfs_fs_info, kobj);
- kfree(fsinfo);
-}
-
-static struct kobj_type btrfs_fsinfo_ktype = {
- .release = btrfs_fsinfo_release,
-};
-
struct btrfs_iget_args {
u64 ino;
struct btrfs_root *root;
};
-decl_subsys(btrfs, &btrfs_fsinfo_ktype, NULL);
-
#define BTRFS_SUPER_MAGIC 0x9123682E
static struct inode_operations btrfs_dir_inode_operations;
{
struct btrfs_inode *ei = (struct btrfs_inode *) foo;
- if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
+ if ((flags & (SLAB_CTOR_CONSTRUCTOR)) ==
SLAB_CTOR_CONSTRUCTOR) {
inode_init_once(&ei->vfs_inode);
}
err = init_inodecache();
if (err)
return err;
- kset_set_kset_s(&btrfs_subsys, fs_subsys);
- err = subsystem_register(&btrfs_subsys);
- if (err)
- goto out;
return register_filesystem(&btrfs_fs_type);
-out:
destroy_inodecache();
return err;
}
{
destroy_inodecache();
unregister_filesystem(&btrfs_fs_type);
- subsystem_unregister(&btrfs_subsys);
printk("btrfs unloaded\n");
}