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

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


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.

Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
fs/vboxsf/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c
index 4bebd947314a..178fc74e399f 100644
--- a/fs/vboxsf/file.c
+++ b/fs/vboxsf/file.c
@@ -316,10 +316,10 @@ static int vboxsf_write_end(const struct kiocb *iocb,
if (!folio_test_uptodate(folio) && copied < len)
folio_zero_range(folio, from + copied, len - copied);

- buf = kmap(&folio->page);
+ buf = kmap_local_folio(folio, 0);
err = vboxsf_write(sf_handle->root, sf_handle->handle,
pos, &nwritten, buf + from);
- kunmap(&folio->page);
+ kunmap_local(buf);

if (err) {
nwritten = 0;

---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250811-vboxsf_folio-343a7cd9e9b2

Best regards,
--
Tal Zussman <tz2294@xxxxxxxxxxxx>