On Monday 16 August 2010, Frank Mehnert wrote:
> On Monday 16 August 2010, Alex wrote:
> > Please post final patch here to let people know when it is ready :)
>
> r31680, r31697, r31702, r31703.
well, as per request I attach the Linux 2.6.36 fixes for the
vboxnetadp and vboxsf modules here. Both can be applied to
the VBox 3.2.8 tree (in the proper subdirectories) or to the
installed module sources in /usr/src/vbox*
Kind regards,
Frank
--
ORACLE Deutschland B.V. & Co. KG Dr.-Ing. Frank Mehnert
Werkstrasse 24 Staff Engineer, VirtualBox
71384 Weinstadt, Germany mailto:[email protected]
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
--- linux/VBoxNetAdp-linux.c (revision 64881)
+++ linux/VBoxNetAdp-linux.c (revision 64882)
@@ -60,7 +60,12 @@
static int VBoxNetAdpLinuxOpen(struct inode *pInode, struct file *pFilp);
static int VBoxNetAdpLinuxClose(struct inode *pInode, struct file *pFilp);
-static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
+static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
+static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp,
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
+ unsigned int uCmd, unsigned long ulArg);
/*******************************************************************************
* Global Variables *
@@ -83,7 +88,11 @@
owner: THIS_MODULE,
open: VBoxNetAdpLinuxOpen,
release: VBoxNetAdpLinuxClose,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
ioctl: VBoxNetAdpLinuxIOCtl,
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
+ unlocked_ioctl: VBoxNetAdpLinuxIOCtlUnlocked,
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
};
/** The miscdevice structure. */
@@ -246,7 +255,12 @@
* @param uCmd The function specified to ioctl().
* @param ulArg The argument specified to ioctl().
*/
-static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp, unsigned int uCmd, unsigned long ulArg)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
+static int VBoxNetAdpLinuxIOCtl(struct inode *pInode, struct file *pFilp,
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
+static long VBoxNetAdpLinuxIOCtlUnlocked(struct file *pFilp,
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) */
+ unsigned int uCmd, unsigned long ulArg)
{
VBOXNETADPREQ Req;
PVBOXNETADP pAdp;
--- vfsmod.c (revision 64881)
+++ vfsmod.c (revision 64882)
@@ -337,6 +337,7 @@
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
/* this is called when vfs is about to destroy the [inode]. all
resources associated with this [inode] must be cleared here */
static void
@@ -355,7 +356,27 @@
kfree(sf_i);
SET_INODE_INFO(inode, NULL);
}
+#else
+static void
+sf_evict_inode(struct inode *inode)
+{
+ struct sf_inode_info *sf_i;
+ TRACE();
+ truncate_inode_pages(&inode->i_data, 0);
+ end_writeback(inode);
+
+ sf_i = GET_INODE_INFO(inode);
+ if (!sf_i)
+ return;
+
+ BUG_ON(!sf_i->path);
+ kfree(sf_i->path);
+ kfree(sf_i);
+ SET_INODE_INFO(inode, NULL);
+}
+#endif
+
/* this is called by vfs when it wants to populate [inode] with data.
the only thing that is known about inode at this point is its index
hence we can't do anything here, and let lookup/whatever with the
@@ -403,7 +424,11 @@
}
static struct super_operations sf_super_ops = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
.clear_inode = sf_clear_inode,
+#else
+ .evict_inode = sf_evict_inode,
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
.read_inode = sf_read_inode,
#endif
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev