All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Subject: Compiling virtualbox with Linux 2.6.38
Date: Sun, 27 Mar 2011 07:50:47 -0400	[thread overview]
Message-ID: <20110327115047.GJ4183@linux.intel.com> (raw)


The Virtualbox developers have segregated themselves into a walled garden
of their own choice (only subscribers may post to vbox-dev; you have to
sign up to join their forums, etc, etc.).  So in the hopes of reaching
anybody who cares, here is a patch to Virtualbox to handle the recent
VFS change of replacing ->get_sb with ->mount.

This isn't enough to get virtualbox to compile with a recent kernel.
The DRM change that replaced pci_driver with kdriver seems harder to ifdef
a solution to.  Maybe somebody else out there has already done this work
and is similarly waiting for somebody else to do the VFS portion :-)

Index: src/VBox/Additions/linux/sharedfolders/vfsmod.c
===================================================================
--- src/VBox/Additions/linux/sharedfolders/vfsmod.c	(revision 36443)
+++ src/VBox/Additions/linux/sharedfolders/vfsmod.c	(working copy)
@@ -453,20 +453,31 @@
     TRACE();
     return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
 }
-#else
+#elsif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
 static int sf_get_sb(struct file_system_type *fs_type, int flags,
                      const char *dev_name, void *data, struct vfsmount *mnt)
 {
     TRACE();
     return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
 }
+#else
+static struct dentry *sf_mount(struct file_system_type *fs_type, int flags,
+                     const char *dev_name, void *data)
+{
+    TRACE();
+    return mount_nodev(fs_type, flags, data, sf_read_super_26);
+}
 #endif
 
 static struct file_system_type vboxsf_fs_type =
 {
     .owner   = THIS_MODULE,
     .name    = "vboxsf",
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
     .get_sb  = sf_get_sb,
+#else
+    .mount   = sf_mount,
+#endif
     .kill_sb = kill_anon_super
 };
 #endif

                 reply	other threads:[~2011-03-27 11:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110327115047.GJ4183@linux.intel.com \
    --to=willy@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.