From nobody Thu Sep 11 02:10:35 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3A78C64EC7 for ; Thu, 23 Feb 2023 02:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232929AbjBWCo3 (ORCPT ); Wed, 22 Feb 2023 21:44:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbjBWCo1 (ORCPT ); Wed, 22 Feb 2023 21:44:27 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94DCB279B5 for ; Wed, 22 Feb 2023 18:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=krGz8JNPEfUKWYOBIr5M4Mxvx6mftCSbjb3cTtYDfCE=; b=WPU7CMVf2DgW2/TSJHS9J0wBbm 7uuRWz2+zFq+EasHiqr1iOkkS9NL5LWxlcCD3ssYHfVxIZqQ+gtxv8xIAdydY8zeX2XXxPd32DMrA xH98Va7Idt0dDo+kqQgqTYTrqEJ2RAZYXxd257F82UMExgv3lmhVcPSPPsWAeKfauFFTA3TPeq+Di Uq9O1gx1dLSp7+uLiQvB2zJWZIz0xjOpuHO5MScdavofEmCokIJtKYMbj90wP8/izrEAVUewGnRZo UUKkZ2ofyPO4lPHlNe3XteK6m8dKpiwygeke619PsuduCvAAoLvnnP9ZRzHoaSHqgmML7d+uGrreJ IZ2d8kFg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pV1ah-00EmN8-6C; Thu, 23 Feb 2023 02:44:15 +0000 From: Luis Chamberlain To: hughd@google.com, akpm@linux-foundation.org, willy@infradead.org Cc: linux-mm@kvack.org, p.raghav@samsung.com, dave@stgolabs.net, a.manzanares@samsung.com, yosryahmed@google.com, mcgrof@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v2 1/5] shmem: remove check for folio lock on writepage() Date: Wed, 22 Feb 2023 18:44:08 -0800 Message-Id: <20230223024412.3522465-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230223024412.3522465-1-mcgrof@kernel.org> References: <20230223024412.3522465-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Matthew notes we should not need to check the folio lock on the writepage() callback so remove it. This sanity check has been lingering since linux-history days. We remove this as we tidy up the writepage() callback to make things a bit clearer. Suggested-by: Matthew Wilcox Signed-off-by: Luis Chamberlain --- mm/shmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 28f3c699c8ce..b3ad619328bf 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1351,7 +1351,6 @@ static int shmem_writepage(struct page *page, struct = writeback_control *wbc) folio_clear_dirty(folio); } =20 - BUG_ON(!folio_test_locked(folio)); mapping =3D folio->mapping; index =3D folio->index; inode =3D mapping->host; --=20 2.39.1