Skip to content

Commit a8e8f85

Browse files
dtormcgrof
authored andcommitted
module: fix building with sysfs disabled
Sysfs support might be disabled so we need to guard the code that instantiates "compression" attribute with an #ifdef. Fixes: b1ae6dc ("module: add in-kernel support for decompressing") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
1 parent 3593030 commit a8e8f85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/module_decompress.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ void module_decompress_cleanup(struct load_info *info)
250250
info->max_pages = info->used_pages = 0;
251251
}
252252

253+
#ifdef CONFIG_SYSFS
253254
static ssize_t compression_show(struct kobject *kobj,
254255
struct kobj_attribute *attr, char *buf)
255256
{
@@ -269,3 +270,4 @@ static int __init module_decompress_sysfs_init(void)
269270
return 0;
270271
}
271272
late_initcall(module_decompress_sysfs_init);
273+
#endif

0 commit comments

Comments
 (0)