提交 b4a2a0ed 编写于 作者: J Jens Axboe 提交者: Chris Mason

Btrfs: sysfs compile fixup

Just use kobject_set_name(), that works in all kernels (I think...).
Kernels newer than 2.6.23 currently fail with:

/home/axboe/git/btrfs/btrfs-unstable/sysfs.c:188: error: unknown field
'name' specified in initializer
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 bbf0d006
......@@ -184,9 +184,7 @@ static struct kobj_type btrfs_super_ktype = {
.release = btrfs_super_release,
};
static struct kset btrfs_kset = {
.kobj = {.name = "btrfs"},
};
static struct kset btrfs_kset;
int btrfs_sysfs_add_super(struct btrfs_fs_info *fs)
{
......@@ -249,6 +247,7 @@ void btrfs_sysfs_del_super(struct btrfs_fs_info *fs)
int btrfs_init_sysfs()
{
kobj_set_kset_s(&btrfs_kset, fs_subsys);
kobject_set_name(&btrfs_kset.kobj, "btrfs");
return kset_register(&btrfs_kset);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册