zswap: clear compressor or zpool param if invalid at init
authorDan Streetman <ddstreet@ieee.org>
Mon, 27 Feb 2017 22:26:50 +0000 (14:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Feb 2017 02:43:45 +0000 (18:43 -0800)
commitbae21db88b7075662f28a0aa57e97016a2fdabfd
treec052b5c5769cd00584c4e5744249ecac5c6d63dd
parentae3d89a7e0871bc7b57ef8d3c4dd7fdda43c285c
zswap: clear compressor or zpool param if invalid at init

If either the compressor and/or zpool param are invalid at boot, and
their default value is also invalid, set the param to the empty string
to indicate there is no compressor and/or zpool configured.  This allows
users to check the sysfs interface to see which param needs changing.

Link: http://lkml.kernel.org/r/20170124200259.16191-4-ddstreet@ieee.org
Signed-off-by: Dan Streetman <dan.streetman@canonical.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/zswap.c