Re: [PATCH] vboxsf: Convert vboxsf_write_end() to use kmap_local_folio()

From: Tal Zussman
Date: Mon Aug 11 2025 - 18:31:45 EST


On Tue, Aug 12, 2025 at 1:12 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Mon, Aug 11, 2025 at 05:42:00PM -0400, Tal Zussman wrote:
> > Now that vboxsf_write_end() takes a folio, convert the kmap() call to
> > kmap_local_folio(). This removes two instances of &folio->page as
> > well.
> >
> > Compile-tested only.
>
> Yeah ... I don't know if this is safe or not. Needs actual testing.

Could you elaborate on why this might be unsafe? I assumed that (1) this is
similar to the conversion done in vboxsf_writepages() and (2) that the
kmap() call here could be simply converted to kmap_local_page() and then to
kmap_local_folio(), but clearly I'm missing something...