[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b33f05e8-9c5b-4be0-977d-005ca525d1db@lucifer.local>
Date: Mon, 12 May 2025 12:31:34 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Christian Brauner <brauner@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Jann Horn <jannh@...gle.com>, Pedro Falcato <pfalcato@...e.de>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>, Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2 1/3] mm: introduce new .mmap_prepare() file callback
On Mon, May 12, 2025 at 11:24:06AM +0200, Christian Brauner wrote:
> On Fri, May 09, 2025 at 01:13:34PM +0100, Lorenzo Stoakes wrote:
[snip]
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 016b0fe1536e..e2721a1ff13d 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
[snip]
> > static inline int call_mmap(struct file *file, struct vm_area_struct *vma)
> > {
> > + if (WARN_ON_ONCE(file->f_op->mmap_prepare))
> > + return -EINVAL;
> > +
> > return file->f_op->mmap(file, vma);
> > }
> >
> > +static inline int __call_mmap_prepare(struct file *file,
> > + struct vm_area_desc *desc)
> > +{
> > + return file->f_op->mmap_prepare(desc);
> > +}
>
> nit: I would prefer if we could rename this to vfs_mmap() and
> vfs_mmap_prepare() as this is in line with all the other vfs related
> helpers we expose.
>
Happy to do it, but:
call_mmap() is already invoked in a bunch of places, so kinda falls outside this
series (+ would touch a bunch of unrelated files), would you mind if I sent that
separately?
Thanks!
[snip]
Powered by blists - more mailing lists