diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-19 09:23:08 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:57 -0400 |
commit | b4a2a0edfda5a721bb4c5fa0068d2ad7ea67f98b (patch) | |
tree | 77fb5ea8e40249955dbe0aa5039ea7a56ec2c4f3 /fs/btrfs/sysfs.c | |
parent | bbf0d0062da2b3e1e239e381f8ac20971ef1b2ed (diff) | |
download | op-kernel-dev-b4a2a0edfda5a721bb4c5fa0068d2ad7ea67f98b.zip op-kernel-dev-b4a2a0edfda5a721bb4c5fa0068d2ad7ea67f98b.tar.gz |
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: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r-- | fs/btrfs/sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 0bd1fd3..1671c73 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -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); } |