mm/zswap.c: change params from hidden to ro
authorDan Streetman <[email protected]>
Thu, 23 Jan 2014 23:52:48 +0000 (15:52 -0800)
committerLinus Torvalds <[email protected]>
Fri, 24 Jan 2014 00:36:50 +0000 (16:36 -0800)
The "compressor" and "enabled" params are currently hidden, this changes
them to read-only, so userspace can tell if zswap is enabled or not and
see what compressor is in use.

Signed-off-by: Dan Streetman <[email protected]>
Cc: Vladimir Murzin <[email protected]>
Cc: Bob Liu <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Weijie Yang <[email protected]>
Acked-by: Seth Jennings <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/zswap.c

index 5a63f78a5601aa63112f30b3338be6c413f02f4c..e55bab9dc41f81ab1b6384710e918f3839e0c936 100644 (file)
@@ -77,12 +77,12 @@ static u64 zswap_duplicate_entry;
 **********************************/
 /* Enable/disable zswap (disabled by default, fixed at boot for now) */
 static bool zswap_enabled __read_mostly;
-module_param_named(enabled, zswap_enabled, bool, 0);
+module_param_named(enabled, zswap_enabled, bool, 0444);
 
 /* Compressor to be used by zswap (fixed at boot for now) */
 #define ZSWAP_COMPRESSOR_DEFAULT "lzo"
 static char *zswap_compressor = ZSWAP_COMPRESSOR_DEFAULT;
-module_param_named(compressor, zswap_compressor, charp, 0);
+module_param_named(compressor, zswap_compressor, charp, 0444);
 
 /* The maximum percentage of memory that the compressed pool can occupy */
 static unsigned int zswap_max_pool_percent = 20;