]> granicus.if.org Git - zfs/commitdiff
Set zvol_major/zvol_threads permissions
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Dec 2011 17:23:44 +0000 (09:23 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Dec 2011 17:27:50 +0000 (09:27 -0800)
The zvol_major and zvol_threads module options were being created
with 0 permission bits.  This prevented them from being listed in
the /sys/module/zfs/parameters/ directory, although they were
visible in `modinfo zfs`.  This patch fixes the issue by updating
the permission bits to 0444.  For the moment these options must
be read-only because they are used during module initialization.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #392

module/zfs/zvol.c

index 61e22b8ecfaf947e3380ebc6adf86a208477c643..a25fbbe5e565fd3aeb0e0e7b859ef0aa3b7bdae1 100644 (file)
@@ -1350,8 +1350,8 @@ zvol_fini(void)
        list_destroy(&zvol_state_list);
 }
 
-module_param(zvol_major, uint, 0);
+module_param(zvol_major, uint, 0444);
 MODULE_PARM_DESC(zvol_major, "Major number for zvol device");
 
-module_param(zvol_threads, uint, 0);
+module_param(zvol_threads, uint, 0444);
 MODULE_PARM_DESC(zvol_threads, "Number of threads for zvol device");