diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index fa46216523cf4368a96463ae94e9203ade03bb24..052e5ad9a4d2122571389c1d3dc42e99dfda037e 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -373,7 +373,7 @@ int sysfs_add_file_to_group(struct kobject *kobj, return -ENOENT; kobject_get_ownership(kobj, &uid, &gid); - error = sysfs_add_file_mode_ns(kobj->sd, attr, false, + error = sysfs_add_file_mode_ns(parent, attr, false, attr->mode, uid, gid, NULL); kernfs_put(parent);