From: Suren Baghdasaryan <surenb@google.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>,
Shakeel Butt <shakeel.butt@linux.dev>,
Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
Chris Li <chriscli@google.com>
Subject: Re: [PATCH 1/2] mm: Add vma_start_write_killable()
Date: Mon, 3 Nov 2025 15:17:40 -0800 [thread overview]
Message-ID: <CAJuCfpHB8TBpmmMO3xyjqKnuhEFgg10Ani2+U-YP5vu8c34UMw@mail.gmail.com> (raw)
In-Reply-To: <aQk3c0vzEeC8lotz@casper.infradead.org>
On Mon, Nov 3, 2025 at 3:15 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Nov 03, 2025 at 01:53:44PM -0800, Suren Baghdasaryan wrote:
> > > @@ -286,6 +310,9 @@ static inline struct vm_area_struct *vma_start_read(struct mm_struct *mm,
> > > { return NULL; }
> > > static inline void vma_end_read(struct vm_area_struct *vma) {}
> > > static inline void vma_start_write(struct vm_area_struct *vma) {}
> > > +static inline
> > > +int __must_check vma_start_write_killable(struct vm_area_struct *vma)
> > > +{ return 0; }
> >
> > nit: a tab for consistency with other stubs please.
>
> No. This is a stupid indentation style that's not in use anywhere else.
> There is not one inline function in linux/mm.h that uses this formatting.
> If anything, I'd correct the other stubs to match the rest of the kernel.
Ok, I wasn't aware of that.
>
> > Let's add a comment to list possible return values:
> > 0 - the vma is not attached;
> > 1 - the vma is attached with no readers;
> > negative - an error code;
>
> I considered doing that, but decided it wasn't worth doing since there
> are only two callers and it's a static function. If you feel strongly
> I'll add it though.
If it's not too much trouble. I think it's not very clear from reading
the code, so a comment would be helpful.
>
next prev parent reply other threads:[~2025-11-03 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 18:03 [PATCH 0/2] vma_start_write_killable Matthew Wilcox (Oracle)
2025-11-03 18:03 ` [PATCH 1/2] mm: Add vma_start_write_killable() Matthew Wilcox (Oracle)
2025-11-03 21:53 ` Suren Baghdasaryan
2025-11-03 23:14 ` Matthew Wilcox
2025-11-03 23:17 ` Suren Baghdasaryan [this message]
2025-11-04 16:09 ` Matthew Wilcox
2025-11-07 19:12 ` Liam R. Howlett
2025-11-03 18:03 ` [PATCH 2/2] mm: Use vma_start_write_killable() in dup_mmap() Matthew Wilcox (Oracle)
2025-11-03 21:56 ` Suren Baghdasaryan
2025-11-07 19:12 ` Liam R. Howlett
2025-11-04 9:08 ` [syzbot ci] Re: vma_start_write_killable syzbot ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJuCfpHB8TBpmmMO3xyjqKnuhEFgg10Ani2+U-YP5vu8c34UMw@mail.gmail.com \
--to=surenb@google.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=chriscli@google.com \
--cc=jannh@google.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=pfalcato@suse.de \
--cc=shakeel.butt@linux.dev \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).