forked from pool/virtualbox
- Fix for missing global in vboxsf that prevented mounting shared folders
for kernel 4.10. This change is the fix for bsc #1027967. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=315
This commit is contained in:
parent
a7a3bd043a
commit
9cc4332712
@ -3,35 +3,13 @@ Index: VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c
|
||||
===================================================================
|
||||
--- VirtualBox-5.1.14.orig/src/VBox/Additions/linux/sharedfolders/lnkops.c
|
||||
+++ VirtualBox-5.1.14/src/VBox/Additions/linux/sharedfolders/lnkops.c
|
||||
@@ -88,6 +88,31 @@ static const char *sf_get_link(struct de
|
||||
}
|
||||
# endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) */
|
||||
@@ -90,7 +90,9 @@ static const char *sf_get_link(struct de
|
||||
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
|
||||
+/*
|
||||
+ * A helper for ->readlink(). This should be used *ONLY* for symlinks that
|
||||
+ * have ->get_link() not calling nd_jump_link(). Using (or not using) it
|
||||
+ * for any given inode is up to filesystem.
|
||||
+ */
|
||||
+static int generic_readlink(struct dentry *dentry, char __user *buffer,
|
||||
+ int buflen)
|
||||
+{
|
||||
+ DEFINE_DELAYED_CALL(done);
|
||||
+ struct inode *inode = d_inode(dentry);
|
||||
+ const char *link = inode->i_link;
|
||||
+ int res;
|
||||
+
|
||||
+ if (!link) {
|
||||
+ link = inode->i_op->get_link(dentry, inode, &done);
|
||||
+ if (IS_ERR(link))
|
||||
+ return PTR_ERR(link);
|
||||
+ }
|
||||
+ res = readlink_copy(buffer, buflen, link);
|
||||
+ do_delayed_call(&done);
|
||||
+ return res;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
struct inode_operations sf_lnk_iops =
|
||||
{
|
||||
+# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
.readlink = generic_readlink,
|
||||
+#endif
|
||||
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||
.get_link = sf_get_link
|
||||
# elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 4 05:00:03 UTC 2017 - Larry.Finger@lwfinger.net
|
||||
|
||||
- Fix for missing global in vboxsf that prevented mounting shared folders
|
||||
for kernel 4.10. This change is the fix for bsc #1027967.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 28 21:06:30 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user