Skip to content

Commit 9497552

Browse files
committed
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 287fb25 commit 9497552

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
@@ -792,13 +792,13 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,
792792
static int zswap_compressor_param_set(const char *val,
793793
const struct kernel_param *kp)
794794
{
795-
return __zswap_param_set(val, kp, zswap_zpool_type, NULL);
795+
return __zswap_param_set(val, kp, NULL, zswap_compressor);
796796
}
797797

798798
static int zswap_zpool_param_set(const char *val,
799799
const struct kernel_param *kp)
800800
{
801-
return __zswap_param_set(val, kp, NULL, zswap_compressor);
801+
return __zswap_param_set(val, kp, zswap_zpool_type, NULL);
802802
}
803803

804804
static int zswap_enabled_param_set(const char *val,

0 commit comments

Comments
 (0)