All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vboxsf: Convert vboxsf_write_end() to use kmap_local_folio()
@ 2025-08-11 21:42 Tal Zussman
  2025-08-11 22:12 ` Matthew Wilcox
  2025-08-11 22:23 ` Matthew Wilcox
  0 siblings, 2 replies; 4+ messages in thread
From: Tal Zussman @ 2025-08-11 21:42 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Matthew Wilcox, linux-fsdevel, linux-kernel, Tal Zussman

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@columbia.edu>
---
 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@columbia.edu>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-11 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 21:42 [PATCH] vboxsf: Convert vboxsf_write_end() to use kmap_local_folio() Tal Zussman
2025-08-11 22:12 ` Matthew Wilcox
2025-08-11 22:29   ` Tal Zussman
2025-08-11 22:23 ` Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.