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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5627CC433F5 for ; Sat, 28 May 2022 05:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232359AbiE1F7F (ORCPT ); Sat, 28 May 2022 01:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbiE1F7E (ORCPT ); Sat, 28 May 2022 01:59:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35DE22A7 for ; Fri, 27 May 2022 22:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=smPADnsVR5YDwQtqHwKgF9tayL1Q4tQ+CZz+VEL3i4U=; b=Gdj0VhFRWnWj2dvIQlRscq5VNW 7dMJpkOiPCj39OFBDuSEqU1TqDuM1u0Xht8UIG77Y98yLLA9JZa9vq4M6t1C98nTHcXecaqqhCtjd 6ZxGQc0BbitqxRdgadkEG4L88vQkGtApLEhCI53sSS8/bYMbyMYS+HFMOFaTkg7Jd1eMI65BuhItm +ovfNUff5wd4XwY2lGuDAtN8Ei6GryN3DVhhv8V+fdyS+Vh4m9jMg2JiAJYWjeZPv4V0JO7e/yI4d xVjySOa26twfLzcdJrboKt4fJhbfSLNLc0UxjbAvpKhUQKOucSIS1V93il0yu2iobt21eu0/9XoFy /04nmbvg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nupTb-001Wa2-RW; Sat, 28 May 2022 05:59:03 +0000 Date: Fri, 27 May 2022 22:59:03 -0700 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 14/24] remap_range: Remove check of uptodate flag Message-ID: References: <20220527155036.524743-1-willy@infradead.org> <20220527155036.524743-15-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220527155036.524743-15-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, May 27, 2022 at 04:50:26PM +0100, Matthew Wilcox (Oracle) wrote: > read_mapping_folio() returns an ERR_PTR if the folio is not > uptodate, so this check is simply dead code. Looks good: Reviewed-by: Christoph Hellwig > /* Read a page's worth of file data into the page cache. */ > static struct folio *vfs_dedupe_get_folio(struct file *file, loff_t pos) > { > + return read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file); > } But I wonder if this isn't useful enough to go to filemap.c in one form or another.