Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3235315rdh; Mon, 27 Nov 2023 09:09:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGl5T6+xR3h74v7VhaZthtdH0aamh+yCe4HsHfxXFuypLruJtoQawYdfhivCJq0KLH8b30F X-Received: by 2002:a17:90a:1a17:b0:280:1d6c:a6a8 with SMTP id 23-20020a17090a1a1700b002801d6ca6a8mr11399236pjk.23.1701104987284; Mon, 27 Nov 2023 09:09:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104987; cv=none; d=google.com; s=arc-20160816; b=YAk/vjAqkg9XxblEgXhRoGOMpoSsqWx/JfHFp3zypJXXsvhWCXI+kA/zG1sWT+hkqy QFSnoem7LPueYonDbr7qtv8huZqGGjAbT3P6Vz/yEck7ppe8BBoMcN/15nIbk/dXwhrC sFVtgeZs8/4MUe8awIuov1ZI5lN+C6DsKWweBH18kojsuxSabd8mNHy35l96ZAD+WwqY y3FYsgL49yGhVhFIjPi/38Q4H3OZjJCTt4nF8Pqo3eaWx3Bi+H5YAGafVk8dQoLf71G/ SnbZ9nOUNsW6FW+tLeeW8BvAr7IFp7QXyRP7Yz8JzrkqZOFr8hRm63g4MjnCe8/UJw5S MV9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P99EmKb4CapbHLKU/m7jH61AXQCv185cerJCelU8Tkc=; fh=ruGNc7XPO3LylRvRpn0vVR0lD6TajZpFqzd21ZvMtVo=; b=qp+zZVunZ7Iol4WlSf3qVABgo5xYmbBZNfU2Zrnljpjg9HZerZhVbwCB8SdRLwewpx rfLNwYKmXBlLrFX52PVOjCtovZoO51UYcnTusfvXVxEJ3QNn9wRc83aIbRtO8wYVpi2Y t0ebOmo7zqNmfVG6asSeweI1Z2KCvkN0FSz0xXa2dO/iYgaUdgJz3IWuusHthlaFKrKr 5he7nwT7jNXjyLpraMv/bCMqjFCMyRXpWXEwml0D1rh7P/A9j6mqM96KBeypLZCLVSno dgd56Pt84+T5MemX3Z2QegBz1/ibYxB8uxsWnYtkdGSnxjUkeGUKV5T0ekfy/hVXY0pY KfTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bh1p6YKU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i15-20020a17090adc0f00b002810ae70420si10385383pjv.121.2023.11.27.09.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:09:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bh1p6YKU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C5FA1805C146; Mon, 27 Nov 2023 09:09:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234711AbjK0RJ0 (ORCPT + 99 others); Mon, 27 Nov 2023 12:09:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234670AbjK0RJD (ORCPT ); Mon, 27 Nov 2023 12:09:03 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131661B5; Mon, 27 Nov 2023 09:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=P99EmKb4CapbHLKU/m7jH61AXQCv185cerJCelU8Tkc=; b=bh1p6YKUVaMZU1UXxX75PJ5pJd Kpt4PCHwleFCJKWQvMAJnka35xkf8igrqA7udG64iX5akAd7ewYwNVf8DIa46ttmKkubyREJEEqsa APaHcb1jLHmtSoBgNafcfPrA5tKj0xujCw7C5k8lYJvkLnnqxRacT0rHL1LWEpWhKyeacOpxjCjlv Gbri0WJTkS92HNMGbEview6G8gs+nbJILS3r3BqxSbOskP57tCdPTJY0wi7KO2Sc1NUCRcPuw9sQn Ht+PqBy2Xo/mXg7vwW+TwWYAz1EDrYlhCugbdQVAn+AcE/KRcKlgR5ZfxSl4ZZCXPlH6R5EXOQ+Wb 5JWsZefA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r7f6Q-00Ba0a-QH; Mon, 27 Nov 2023 17:08:58 +0000 Date: Mon, 27 Nov 2023 17:08:58 +0000 From: Matthew Wilcox To: Ryusuke Konishi Cc: Andrew Morton , linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/17] nilfs2: eliminate staggered calls to kunmap in nilfs_rename Message-ID: References: <20231127143036.2425-1-konishi.ryusuke@gmail.com> <20231127143036.2425-3-konishi.ryusuke@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127143036.2425-3-konishi.ryusuke@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 09:09:41 -0800 (PST) On Mon, Nov 27, 2023 at 11:30:21PM +0900, Ryusuke Konishi wrote: > In nilfs_rename(), calls to nilfs_put_page() to release pages obtained > with nilfs_find_entry() or nilfs_dotdot() are alternated in the normal > path. > > When replacing the kernel memory mapping method from kmap to > kmap_local_{page,folio}, this violates the constraint on the calling > order of kunmap_local(). > > Swap the order of nilfs_put_page calls where the kmap sections of > multiple pages overlap so that they are nested, allowing direct > replacement of nilfs_put_page() -> unmap_and_put_page(). > > Without this reordering, that replacement will cause a kernel WARNING > in kunmap_local_indexed() on architectures with high memory mapping. > > Signed-off-by: Ryusuke Konishi > Cc: Matthew Wilcox (Oracle) Thanks for catching this! Reviewed-by: Matthew Wilcox (Oracle)