Index: /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
===================================================================
--- /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c	(revision 38942)
+++ /trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c	(revision 38943)
@@ -1551,7 +1551,7 @@
 		if (error != 0)
 		{
-			cmn_err(CE_WARN, "sffs_readpages: sfprov_read() failed. error=%d bytes=%ld\n", error, bytes);
+			cmn_err(CE_WARN, "sffs_readpages: sfprov_read() failed. error=%d bytes=%u\n", error, bytes);
 			/* Get rid of all kluster pages read & bail.  */
-			pvn_read_done(ppages,  B_ERROR);
+			pvn_read_done(ppages, B_ERROR);
 			return (error);
 		}
@@ -1700,6 +1700,6 @@
 {
 	/*
-	 * We don't support PROT_WRITE mmaps. Just pretend we're done writing back
-	 * to the disk while unmounting/closing the node and discarding the mapped pages.
+	 * This would not get invoked i.e. via pvn_vplist_dirty() since we don't support
+	 * PROT_WRITE mmaps and therefore will not have dirty pages.
 	 */
 	pvn_write_done(ppage, B_INVAL | B_ERROR | B_FORCE);
@@ -1809,11 +1809,6 @@
 	)
 {
-	sfnode_t *node = VN2SFN(dvp);
-	uint64_t npages = btopr(len);
-
 	if (dvp->v_flag & VNOMAP)
 		return (ENOSYS);
-
-	ASSERT(node);
 	return (0);
 }
@@ -1837,10 +1832,6 @@
 	)
 {
-	sfnode_t *node = VN2SFN(dvp);
-	uint64_t npages = btopr(len);
-
 	if (dvp->v_flag & VNOMAP)
 		return (ENOSYS);
-
 	return (0);
 }
@@ -2026,4 +2017,5 @@
 		/* We're fine with releasing the vnode lock here as we should be covered by the sffs_lock */
 		mutex_exit(&vp->v_lock);
+		/* We won't have any dirty pages, this will just invalidate (destroy) the pages and move it to the cachelist. */
 		pvn_vplist_dirty(vp, 0 /* offset */, sffs_discardpage, B_INVAL, cr);
 		mutex_enter(&vp->v_lock);
