From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750916AbdAXUDT (ORCPT ); Tue, 24 Jan 2017 15:03:19 -0500 Received: from mail-yb0-f194.google.com ([209.85.213.194]:34765 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbdAXUDS (ORCPT ); Tue, 24 Jan 2017 15:03:18 -0500 From: Dan Streetman To: Linux-MM , Andrew Morton Cc: Dan Streetman , Seth Jennings , Michal Hocko , Sergey Senozhatsky , Minchan Kim , linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Fix zswap init failure behavior Date: Tue, 24 Jan 2017 15:02:56 -0500 Message-Id: <20170124200259.16191-1-ddstreet@ieee.org> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If zswap fails to initialize itself at boot, it returns error from its init function; but for built-in drivers, that does not unload them; and more importantly, it doesn't prevent their sysfs module param interface from being created. In this case, changing the compressor or zpool param will result in a WARNING because zswap didn't expect them to be changed if initialization failed. These patches fix that assumption, as well as allowing pool creation after a failed initialization, if only the zpool and/or compressor creation failed. Dan Streetman (3): zswap: disable changing params if init fails zswap: allow initialization at boot without pool zswap: clear compressor or zpool param if invalid at init mm/zswap.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 100 insertions(+), 25 deletions(-) -- 2.9.3