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=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,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 3268DC433DF for ; Thu, 15 Oct 2020 11:38:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2D10E212CC for ; Thu, 15 Oct 2020 11:38:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MQ1lQ7QG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D10E212CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1B35F94000C; Thu, 15 Oct 2020 07:38:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13DA0900002; Thu, 15 Oct 2020 07:38:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1F2494000C; Thu, 15 Oct 2020 07:38:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id C1494900002 for ; Thu, 15 Oct 2020 07:38:35 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 53AD4181AC9CB for ; Thu, 15 Oct 2020 11:38:35 +0000 (UTC) X-FDA: 77373962190.15.magic13_1f060e627214 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 230981814B0C8 for ; Thu, 15 Oct 2020 11:38:35 +0000 (UTC) X-HE-Tag: magic13_1f060e627214 X-Filterd-Recvd-Size: 3037 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 15 Oct 2020 11:38:34 +0000 (UTC) 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=HvK1K6vUxDvqtColNXbsVV3cp23c2ZJIGqkC190E7dA=; b=MQ1lQ7QGP43wzfdydVf6XcZ91K R1z2/pVN4VFgteVvlJcMUMTD4to8puSFW7OK8HWLXmTLHwD4koFLVk4tzwzoOQ+FBdMqaA76jz3Fj 0U8guZfofBtvzj+3E/BaZmcW/rkeAqX1XDxlGPZIAyqNyuN4Hwn3P41prOl9cGcQ57OWVu4vMlwU1 SIbQOmr7tAm/0NjWj/XOSc6fgbjZX5p+5DWsO8gN/KRV0GJosM/QLAYkAH//FUpYpuNvbknomvtlV UKTiiOi2WvoXVjyz1zeklVofZdkjp8LCkvunPVPqNXdoIU+ztVK+4G6EqgA5JbRxuDtGyahobiU/u BBa7S4DA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kT1aU-00046q-5h; Thu, 15 Oct 2020 11:38:26 +0000 Date: Thu, 15 Oct 2020 12:38:26 +0100 From: Matthew Wilcox To: "Darrick J. Wong" Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/2] vfs: move generic_remap_checks out of mm Message-ID: <20201015113826.GX20115@casper.infradead.org> References: <160272187483.913987.4254237066433242737.stgit@magnolia> <160272188127.913987.8729718777463390497.stgit@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <160272188127.913987.8729718777463390497.stgit@magnolia> 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: On Wed, Oct 14, 2020 at 05:31:21PM -0700, Darrick J. Wong wrote: > I would like to move all the generic helpers for the vfs remap range > functionality (aka clonerange and dedupe) into a separate file so that > they won't be scattered across the vfs and the mm subsystems. The > eventual goal is to be able to deselect remap_range.c if none of the > filesystems need that code, but the tricky part here is picking a > stable(ish) part of the merge window to rearrange code. This makes sense to me. There's nothing page-cache about this function. > diff --git a/mm/filemap.c b/mm/filemap.c > index 99c49eeae71b..cf20e5aeb11b 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -3098,8 +3098,7 @@ EXPORT_SYMBOL(read_cache_page_gfp); > * LFS limits. If pos is under the limit it becomes a short access. If it > * exceeds the limit we return -EFBIG. > */ > -static int generic_write_check_limits(struct file *file, loff_t pos, > - loff_t *count) > +int generic_write_check_limits(struct file *file, loff_t pos, loff_t *count) > { > struct inode *inode = file->f_mapping->host; > loff_t max_size = inode->i_sb->s_maxbytes; I wonder if generic_write_check_limits should be in fs/read_write.c -- it has nothing to do with the pagecache either.