[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201015113826.GX20115@casper.infradead.org>
Date: Thu, 15 Oct 2020 12:38:26 +0100
From: Matthew Wilcox <willy@...radead.org>
To: "Darrick J. Wong" <darrick.wong@...cle.com>
Cc: akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
torvalds@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/2] vfs: move generic_remap_checks out of mm
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.
Powered by blists - more mailing lists