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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 1A8B8C63699 for ; Sat, 14 Nov 2020 15:15:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5F9D22265 for ; Sat, 14 Nov 2020 15:15:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="isdbDIxj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbgKNPPS (ORCPT ); Sat, 14 Nov 2020 10:15:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726457AbgKNPPS (ORCPT ); Sat, 14 Nov 2020 10:15:18 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE86C0613D1; Sat, 14 Nov 2020 07:15:17 -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=pnMpGSz3WU3Qg8VEEi9swkyNkUmB/TSLQSr/FRvOqUs=; b=isdbDIxj3oIXpGFPhZtcqH77yD eBdRgfYjuDhfRo/OvV1OUi5d4ojRktgwx6KkuKlVzP/Qoo6d52ImRe3FadCWrssvlyAtqzxG7FWVZ 0htEEW3CzMFEfr7RgfetWJklYyDp8lIzWYjWrAGrdC5dcUko4+uNgBDF+9Fm0pQquov2x8Je3lnG1 A8zwrk4LfcIkXPYSLDMhkPq8IVHuxpXrNg92TaanaRSustnVFcQo/ngRpZM52nBE6i6Nh2OwvNYv3 kNpmdARWu053CLUDEDvOIGqC1FnVKRrRNj45GJP7rjgBhcchOmhfA4rwWofcPV9Fa1Od4wNXMSjYf qqyjg+6Q==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdxGk-00014a-Ob; Sat, 14 Nov 2020 15:15:14 +0000 Date: Sat, 14 Nov 2020 15:15:14 +0000 From: Matthew Wilcox To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hughd@google.com, hannes@cmpxchg.org, yang.shi@linux.alibaba.com, dchinner@redhat.com, linux-kernel@vger.kernel.org, Jan Kara , William Kucharski Subject: Re: [PATCH v4 06/16] mm/filemap: Add helper for finding pages Message-ID: <20201114151514.GL17076@casper.infradead.org> References: <20201112212641.27837-1-willy@infradead.org> <20201112212641.27837-7-willy@infradead.org> <20201114100318.GG19102@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201114100318.GG19102@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2020 at 11:03:18AM +0100, Christoph Hellwig wrote: > On Thu, Nov 12, 2020 at 09:26:31PM +0000, Matthew Wilcox (Oracle) wrote: > > + if (mark == XA_PRESENT) > > + page = xas_find(xas, max); > > + else > > + page = xas_find_marked(xas, max, mark); > > Is there any good reason xas_find_marked can't handle the XA_PRESENT > case as well? I've been thinking about making that change. It's a little trickier than I thought it would be, so it's on the back burner for now.