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 4B9F3C61DA3 for ; Thu, 26 Jan 2023 17:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbjAZRYs (ORCPT ); Thu, 26 Jan 2023 12:24:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjAZRYr (ORCPT ); Thu, 26 Jan 2023 12:24:47 -0500 Received: from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com [IPv6:2607:f8b0:4864:20::e2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECF2FEF9F; Thu, 26 Jan 2023 09:24:46 -0800 (PST) Received: by mail-vs1-xe2d.google.com with SMTP id 3so2629967vsq.7; Thu, 26 Jan 2023 09:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qHlmTunQ49C1Dpyk77Z4C3k4Cau4j+Xb//Hx9WL7A8k=; b=FcVVUD0R+CepEE82KTwR5p856vdMWJsT8H3faHwVqVudmDdIF4Lcfrg/SHWvuzVpWF KA1kLRC9qaFiYMLpexmhNHDdgVJLefzkTqzrfB096e/Nh7scJpPIASgZfXzCCsgbBObo BTqxf3peJlRY1R6MhO6OJbfFx0Fc5aAcwVL0v0vA9EkBPvf6OfaJbVZgOVqaqXDtAmd+ bLwYoW1Us2QDe+hiDLMCAN7ceajba131vdEy/eZtQwB7bSeqLgQdh+6Q6+S2vwIvhii5 yyOMBLagGZW37aZdWToQMqAEtPdoBK0EhksXhUNvoEWT6160ijCRlx0xf8Wmnr7UcnYZ WzAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qHlmTunQ49C1Dpyk77Z4C3k4Cau4j+Xb//Hx9WL7A8k=; b=pf8Yytdpg6y1JgNYatU9+FAF8UQgIsELYqqJAfDhyGdep36vFt7yHttlDBvBTo9Ib7 g7h1jtRZnX0y7IYwAyP2qaQEHt9EO5hVZeKG6cpi6f7MtcRqOUXHZGFoZ5UGsVBAEYMF AK7mXe8XJfeQsWKDR3S548DDEaZSIhNyjcFyLe6h8M5aq4mo/U3atu4crrRmhB8V20GC tzPVOy468ZPvEWVHF8CyI5rlK1QlddW4URHHoXMZGO3gxnwbmNJuStmH+esEG8AUS92P 86hqlXz5moURlSJe08Q6rzL8E0UyVPge1iKa7+ZtfzQvbDHc8pnqzWELJP1f3tlPy7qb aSxw== X-Gm-Message-State: AFqh2kowFnTA2Vc2KUgHpFELMxQkp6T20yFsXi5WRS4cLp5UZSaiWWoj ME6ZqQd8h7wVLux88lJ7+LaJJ9pKhGaNIpdiWQlbuTXX8kY= X-Google-Smtp-Source: AMrXdXstMx4Lc6leAXpj1VV45UXIVItPQZcy2o9t6/kD/JJrrhSQhYl4SzeJqctMxVoXgA7/dxFlIFpz/owb7AnAd4Y= X-Received: by 2002:a05:6102:6c2:b0:3ce:bced:178 with SMTP id m2-20020a05610206c200b003cebced0178mr4927618vsg.84.1674753885888; Thu, 26 Jan 2023 09:24:45 -0800 (PST) MIME-Version: 1.0 References: <20230121065755.1140136-1-hch@lst.de> <20230121065755.1140136-8-hch@lst.de> In-Reply-To: <20230121065755.1140136-8-hch@lst.de> From: Ryusuke Konishi Date: Fri, 27 Jan 2023 02:24:29 +0900 Message-ID: Subject: Re: [PATCH 7/7] mm: return an ERR_PTR from __filemap_get_folio To: Christoph Hellwig Cc: Andrew Morton , Matthew Wilcox , Hugh Dickins , linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nilfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Jan 21, 2023 at 3:59 PM Christoph Hellwig wrote: > > Instead of returning NULL for all errors, distinguish between: > > - no entry found and not asked to allocated (-ENOENT) > - failed to allocate memory (-ENOMEM) > - would block (-EAGAIN) > > so that callers don't have to guess the error based on the passed > in flags. > > Also pass through the error through the direct callers: > filemap_get_folio, filemap_lock_folio filemap_grab_folio > and filemap_get_incore_folio. > > Signed-off-by: Christoph Hellwig > --- For > fs/nilfs2/page.c | 6 +++--- Acked-by: Ryusuke Konishi Thanks, Ryusuke Konishi