mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix in-kernel sysfs entries
The recent sysfs zfs properties feature breaks the in-kernel builds of zfs (sans module). When not built as a module add the sysfs entries under /sys/fs/zfs/. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #7868 Closes #7872
This commit is contained in:
committed by
Brian Behlendorf
parent
e7b677aa5d
commit
73a5ec30bf
@@ -572,11 +572,16 @@ zfs_sysfs_properties_init(zfs_mod_kobj_t *zfs_kobj, struct kobject *parent,
|
||||
void
|
||||
zfs_sysfs_init(void)
|
||||
{
|
||||
struct kobject *parent =
|
||||
&(((struct module *)(THIS_MODULE))->mkobj).kobj;
|
||||
struct kobject *parent;
|
||||
#if defined(CONFIG_ZFS) && !defined(CONFIG_ZFS_MODULE)
|
||||
parent = kobject_create_and_add("zfs", fs_kobj);
|
||||
#else
|
||||
parent = &(((struct module *)(THIS_MODULE))->mkobj).kobj;
|
||||
#endif
|
||||
int err;
|
||||
|
||||
ASSERT(parent != NULL);
|
||||
if (parent == NULL)
|
||||
return;
|
||||
|
||||
err = zfs_kernel_features_init(&kernel_features_kobj, parent);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user