From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E571C433C1 for ; Mon, 29 Mar 2021 06:15:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0B0476195A for ; Mon, 29 Mar 2021 06:15:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B0476195A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9BAC96B0072; Mon, 29 Mar 2021 02:15:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 991E26B0073; Mon, 29 Mar 2021 02:15:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 881B36B0074; Mon, 29 Mar 2021 02:15:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id 682636B0072 for ; Mon, 29 Mar 2021 02:15:21 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1B62B181AF5D3 for ; Mon, 29 Mar 2021 06:15:21 +0000 (UTC) X-FDA: 77971899642.30.84FB462 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf24.hostedemail.com (Postfix) with ESMTP id 4EA2BA0009C5 for ; Mon, 29 Mar 2021 06:15:17 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 36DC361964; Mon, 29 Mar 2021 06:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616998519; bh=cHehHz/XGO7uXoZlIprgnlT4rah2hKwkF3IM0nzDWbU=; h=Subject:To:Cc:From:Date:From; b=udbw3bUuwrxxjLW5ykJU3hriH5Bi7kXQ2flc5B3rMcWDw/eAOdHnLjSydkDc3T1b5 P5nUTciHhcGB18ZZIc1EaEbypiJm76E278WucZYsokQGd89/d7pb6tGyUONT89+LaI VfVax76hidNcnrpwvvoOIY/07GeQbu35B0FLDW6E= Subject: Patch "fs/cachefiles: Remove wait_bit_key layout dependency" has been added to the 5.11-stable tree To: dhowells@redhat.com,gregkh@linuxfoundation.org,hch@lst.de,kafs-testing@auristor.com,linux-cachefs@redhat.com,linux-mm@kvack.org,willy@infradead.org Cc: From: Date: Mon, 29 Mar 2021 08:15:03 +0200 Message-ID: <16169985039077@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 X-stable: commit X-Patchwork-Hint: ignore X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 4EA2BA0009C5 X-Stat-Signature: zjugjeydt9xkreiok8haywmpkp8b53xp Received-SPF: none (linuxfoundation.org>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616998517-570979 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This is a note to let you know that I've just added the patch titled fs/cachefiles: Remove wait_bit_key layout dependency to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=3Dlinux/kernel/git/stable/stable-queue.g= it;a=3Dsummary The filename of the patch is: fs-cachefiles-remove-wait_bit_key-layout-dependency.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 39f985c8f667c80a3d1eb19d31138032fa36b09e Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Sat, 20 Mar 2021 05:40:38 +0000 Subject: fs/cachefiles: Remove wait_bit_key layout dependency From: Matthew Wilcox (Oracle) commit 39f985c8f667c80a3d1eb19d31138032fa36b09e upstream. Cachefiles was relying on wait_page_key and wait_bit_key being the same layout, which is fragile. Now that wait_page_key is exposed in the pagemap.h header, we can remove that fragility A comment on the need to maintain structure layout equivalence was added = by Linus[1] and that is no longer applicable. Fixes: 62906027091f ("mm: add PageWaiters indicating tasks are waiting fo= r a page bit") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Signed-off-by: David Howells Tested-by: kafs-testing@auristor.com cc: linux-cachefs@redhat.com cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20210320054104.1300774-2-willy@infradead.= org/ Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/= commit/?id=3D3510ca20ece0150af6b10c77a74ff1b5c198e3e2 [1] Signed-off-by: Greg Kroah-Hartman --- fs/cachefiles/rdwr.c | 7 +++---- include/linux/pagemap.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -24,17 +24,16 @@ static int cachefiles_read_waiter(wait_q container_of(wait, struct cachefiles_one_read, monitor); struct cachefiles_object *object; struct fscache_retrieval *op =3D monitor->op; - struct wait_bit_key *key =3D _key; + struct wait_page_key *key =3D _key; struct page *page =3D wait->private; =20 ASSERT(key); =20 _enter("{%lu},%u,%d,{%p,%u}", monitor->netfs_page->index, mode, sync, - key->flags, key->bit_nr); + key->page, key->bit_nr); =20 - if (key->flags !=3D &page->flags || - key->bit_nr !=3D PG_locked) + if (key->page !=3D page || key->bit_nr !=3D PG_locked) return 0; =20 _debug("--- monitor %p %lx ---", page, page->flags); --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -559,7 +559,6 @@ static inline pgoff_t linear_page_index( return pgoff; } =20 -/* This has the same layout as wait_bit_key - see fs/cachefiles/rdwr.c *= / struct wait_page_key { struct page *page; int bit_nr; Patches currently in stable-queue which might be from willy@infradead.org= are queue-5.11/fs-cachefiles-remove-wait_bit_key-layout-dependency.patch