From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E52C6519E for ; Tue, 27 Feb 2024 08:54:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709024095; cv=none; b=fnx16mL67YZ9NJb4CshR1XBIour+avoSqsKKJc4O66e6d6DLAVmbm3PJcpHtCVw5yEcv2pkDzVquG8aF0LB9sUvGA3CGPDMpyWFdNLxrNydmW/srbI+r3vgZQqVeBZwkJilC8x5kQ/ktu8y+6NHE5HEpIdv+7myJhf3//Qw2NHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709024095; c=relaxed/simple; bh=YZh9hc7Qi9r8ooGPlJOmv8DHWnf3wmJp9YvfVIUSSo8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZcOsJngTn3jDrkxWgNDS5klOpp0yqUu29sL4LpoedlN8SYem2F2LJSgcjFOB7rkCaCVC1chiGqTHkcBqV7Tsls2I6x607mus5QmD/aKbZJEuRTeawb2W7HneLL0z1xFp0xCTxUk+gUeZS5l0ONJ7vEJDhAj81tzEHQLe0FJm/ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eDYK3cYX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eDYK3cYX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C027C433C7; Tue, 27 Feb 2024 08:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709024094; bh=YZh9hc7Qi9r8ooGPlJOmv8DHWnf3wmJp9YvfVIUSSo8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eDYK3cYXg6+geOXVtIzVj9vkJPAbGdAzblJbiBIPygGHM9viXBiuo4JUKtntAd2J5 Na2jOksxuFkdCtbTE4BWzDoMVhU2ZowXtgJ4et5HkxFWfJVDMS5IcTmSLcDZ4nAI1d Hd/nQfc9kUIWHhS833h7qQ7UEw+TUdxaOlS7B2iA= Date: Tue, 27 Feb 2024 09:54:52 +0100 From: Greg KH To: chengming.zhou@linux.dev Cc: stable@vger.kernel.org, Chengming Zhou , Johannes Weiner , Nhat Pham , Yosry Ahmed , Andrew Morton Subject: Re: [PATCH] mm/zswap: invalidate duplicate entry when !zswap_enabled Message-ID: <2024022743-rented-trembling-7797@gregkh> References: <2024022622-agony-salvaging-5082@gregkh> <20240227022654.3442054-1-chengming.zhou@linux.dev> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227022654.3442054-1-chengming.zhou@linux.dev> On Tue, Feb 27, 2024 at 02:26:54AM +0000, chengming.zhou@linux.dev wrote: > From: Chengming Zhou > > We have to invalidate any duplicate entry even when !zswap_enabled since > zswap can be disabled anytime. If the folio store success before, then > got dirtied again but zswap disabled, we won't invalidate the old > duplicate entry in the zswap_store(). So later lru writeback may > overwrite the new data in swapfile. > > Link: https://lkml.kernel.org/r/20240208023254.3873823-1-chengming.zhou@linux.dev > Fixes: 42c06a0e8ebe ("mm: kill frontswap") > Signed-off-by: Chengming Zhou > Acked-by: Johannes Weiner > Cc: Nhat Pham > Cc: Yosry Ahmed > Cc: > Signed-off-by: Andrew Morton > (cherry picked from commit 678e54d4bb9a4822f8ae99690ac131c5d490cdb1) What tree is this for?