Skip to content

Commit e5e8a22

Browse files
pelwellpopcornmix
authored andcommitted
zswap: Uncross module parameter setting functions
The "compressor" and "zpool" parameters of the zswap module each has a custom setter function that calls __zswap_param_set with specific parameters, but the "zpool" setter uses parameters that are correct for the "compressor" parameter, and vice-versa. Fix this by swapping the function bodies over. Fixes: 90b0fc2 ("zswap: change zpool/compressor at runtime") Signed-off-by: Phil Elwell <[email protected]>
1 parent de4d7e4 commit e5e8a22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/zswap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,13 +761,13 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,
761761
static int zswap_compressor_param_set(const char *val,
762762
const struct kernel_param *kp)
763763
{
764-
return __zswap_param_set(val, kp, zswap_zpool_type, NULL);
764+
return __zswap_param_set(val, kp, NULL, zswap_compressor);
765765
}
766766

767767
static int zswap_zpool_param_set(const char *val,
768768
const struct kernel_param *kp)
769769
{
770-
return __zswap_param_set(val, kp, NULL, zswap_compressor);
770+
return __zswap_param_set(val, kp, zswap_zpool_type, NULL);
771771
}
772772

773773
static int zswap_enabled_param_set(const char *val,

0 commit comments

Comments
 (0)