From patchwork Wed Jan 15 07:19:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 13939982 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C66D9C02180 for ; Wed, 15 Jan 2025 07:20:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 560B5280002; Wed, 15 Jan 2025 02:20:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5112D280001; Wed, 15 Jan 2025 02:20:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D837280002; Wed, 15 Jan 2025 02:20:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 20CB4280001 for ; Wed, 15 Jan 2025 02:20:14 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A70001A1076 for ; Wed, 15 Jan 2025 07:20:13 +0000 (UTC) X-FDA: 83008837506.03.723E100 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf14.hostedemail.com (Postfix) with ESMTP id C7BC410000C for ; Wed, 15 Jan 2025 07:20:11 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="SlMz/D1W"; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf14.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.171 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736925611; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=jWst7CEsxoDR+MlmyvYXB6MxmzLdziqPyCsXYSkJ7fo=; b=L7jiULPpR2hUcij/lMjwhyd8s7DwxwnvaJHDahPNi5BDWHS3LvpaDr6V+gcGjVufCWviXN Vj5wMUdDcROZMCrbl4BCk5q9R6kOQ5gK2R2vyR+d+1nF5jIZtzOfKrXFBNgDnlTx8OJsgK yi8FZroEhThvrYnMtVze1iTJQ4Sg9Lk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736925612; a=rsa-sha256; cv=none; b=1oUpfIRFc0Q03pPApAcQaP9N6zNhk9XDd8meFFuVD3/AjC4JNtGJTfbkHIZ9EShpz+37v8 WpfDlWDIVzaTmRjUKKdyse5n5mE1ux3yRabYQP/WeioXsSF4HGB+3oRlnD4wdXzsXEFoRX Gt5ulFHfknSCJjlZahPUH7NXqCBV8fU= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="SlMz/D1W"; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf14.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.171 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-219f8263ae0so105160435ad.0 for ; Tue, 14 Jan 2025 23:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1736925610; x=1737530410; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jWst7CEsxoDR+MlmyvYXB6MxmzLdziqPyCsXYSkJ7fo=; b=SlMz/D1WciAp2P3vbqhw7zNx2VCqXGtziIHPkR2UCdE6zJH1Z48qwp8LfZYIT0oqQg OgO8If7nltL9xBzJ7flCnuhjOiPxPcsuKJ8qPepcCvMdKlwxK215+N3Xb9ky7iYGWWQ1 evoMtzz4pAEu3onX0eHc1LFcQML1nL5W94tRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736925610; x=1737530410; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jWst7CEsxoDR+MlmyvYXB6MxmzLdziqPyCsXYSkJ7fo=; b=IjDniZ91iqm488aSg6xijqyR/YXewsyzBa8N4CFoNXYhC+Tw+We45BHn5xC9TPhSBf 4YxeZXauLS9166GHBAQxKu0h0e8k1bgM5mwpyO0LdlVXlzZpmoHO3ubCELTNuIB5hohm HR6Dm7Mlk1ra3e9u6xu0NaMqMJCISarzol7/v2s4ssx3fneXa41NOB0x28FWY1jqSdsR cgsyKMOZCXPsOiRsvBlRSdmppVox3geIQDvBjDpK148ku9IRZzF/r0aKjN+VKYfX4ODY af5RG01KsXIRPy7ZqjfsPhhsJwkJXLmBGAeJAlW68ftTIAA7c8y3puo/pCMEzjZWIH10 KM1A== X-Forwarded-Encrypted: i=1; AJvYcCUpw/C51flRXMwL40+BwCe8tuomKaOLcjlvvbEQUae4KcBKcAgpw6yzs5zTYcK+qEs2iLMnAtvbzg==@kvack.org X-Gm-Message-State: AOJu0YymNfD8yFBbrRgZIyDzWJMFjh36zAh1Cie6bEa9C8QSKkYFOa8T POEsKX5CE/v68WWQic3YQwbX+x6C6myHvtY3aedtosG6ziPBdxEaLQR/9WkBfg== X-Gm-Gg: ASbGncuMFbFZotmXOvCD+TWhEK47k+d535cL1U2XVU0wPSRJWWQQiDQWaRBDFJIo6bm K/Mzi6d+XVjK8P6u+ZFgLUj+LRspYStqLUt1mp7TGMUozpDUf5iGjVmE223DbuMSWQyuaTOfaET Z01Cw46ysX3Z7dqXWwzdxvYyTTh66iGh0rl1K0wiFnJXBcQgF3hQmTbl9jzLH42eJN/lyarcAGJ Wj9fJJ1x7rIcWZpPUUgc2VMxZHko5fqED+k0rUKT9eOULS7AqcBpww2pr4= X-Google-Smtp-Source: AGHT+IEup1Svhzkxj5ADbSrGrrC5zT+F+jidXaeQyAEkLBPK4iaHjtUzMBPZBzljTJ3J67vNnrGMTQ== X-Received: by 2002:a05:6a00:2c8d:b0:72d:3c4d:c1ea with SMTP id d2e1a72fcca58-72d3c4dc254mr22273996b3a.7.1736925610412; Tue, 14 Jan 2025 23:20:10 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:2b5b:3224:29a3:d5ab]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-72d405484fbsm8399491b3a.22.2025.01.14.23.20.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2025 23:20:10 -0800 (PST) From: Sergey Senozhatsky To: Andrew Morton Cc: Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: [PATCH] zram: remove zcomp_stream_put() from write_incompressible_page() Date: Wed, 15 Jan 2025 16:19:16 +0900 Message-ID: <20250115072003.380567-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.48.0.rc2.279.g1de40edade-goog MIME-Version: 1.0 X-Stat-Signature: ih9ff9k8nghmuqsn3qzkkciunioi6jj5 X-Rspamd-Queue-Id: C7BC410000C X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1736925611-688554 X-HE-Meta: U2FsdGVkX187ZIbZiZE7GBetLHIW/0x81ApNaxr+p7BAzhs9kHwe6pbcHmudx2JZuFdCcI8XjKk8sXUwa7QdZhvg9R5VMOPcA95BemK2Lryk5SqgrYH0FqyCoGKkhu0uGdAjEKJpnug8SF6GZUP6CXGfvUCLyModcKr201ZSXd2hHOloRFiaPnQlZ5ZQtb6aXGL904dfKvFu1lqJeNJCeylCUC2v/CXbWgYBxrZ+KY3bM5nxBv89uMmKnSg+aJs/r1ka0jx9kLvvRxG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-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: We cannot and should not put per-CPU compression stream in write_incompressible_page() because that function never gets any per-CPU streams in the first place. It's zram_write_page() that puts the stream before it calls write_incompressible_page(). Signed-off-by: Sergey Senozhatsky --- drivers/block/zram/zram_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 70ecaee25c20..9f5020b077c5 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1683,7 +1683,6 @@ static int write_incompressible_page(struct zram *zram, struct page *page, return PTR_ERR((void *)handle); if (!zram_can_store_page(zram)) { - zcomp_stream_put(zram->comps[ZRAM_PRIMARY_COMP]); zs_free(zram->mem_pool, handle); return -ENOMEM; }