Fix build with kernel 3.18.0

OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=282
This commit is contained in:
Dominique Leuenberger 2015-01-05 10:08:57 +00:00 committed by Git OBS Bridge
parent 544968b2d5
commit ae5bd12c66
6 changed files with 60 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jan 5 10:07:50 UTC 2015 - dimstar@opensuse.org
- Add open-vm-tools-3.17.7.patch: Fix building of vmhgfs with
Kernel 3.17.7+.
- Add open-vm-tools-3.18.0.patch: Fix building of vmhgfs with
Kernel 3.18.0+.
-------------------------------------------------------------------
Mon Jan 5 08:42:04 UTC 2015 - dimstar@opensuse.org

View File

@ -78,6 +78,8 @@ Patch6: 0006-Fix-vmxnet-module-on-kernels-3.16.patch
Patch7: 0007-Fix-vmhgfs-module-on-kernels-3.16.patch
Patch8: 0008-Fix-segfault-in-vmhgfs.patch
Patch10: open-vm-tools-linux-3.17.patch
Patch11: open-vm-tools-linux-3.17.7.patch
Patch12: open-vm-tools-linux-3.18.0.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
# don't use pkgconfig(gtk+-2.0) so we can build on SLE
@ -230,6 +232,8 @@ sed -i -e "s/\r//" README
%patch7 -p2
%patch8 -p2
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build
%if ! %{KMP}

View File

@ -0,0 +1,13 @@
Index: open-vm-tools-9.4.6-1770165/modules/linux/vmhgfs/inode.c
===================================================================
--- open-vm-tools-9.4.6-1770165.orig/modules/linux/vmhgfs/inode.c
+++ open-vm-tools-9.4.6-1770165/modules/linux/vmhgfs/inode.c
@@ -1900,7 +1900,7 @@ HgfsPermission(struct inode *inode,
p,
#endif
&inode->i_dentry,
- d_alias) {
+ d_u.d_alias) {
int dcount = compat_d_count(dentry);
if (dcount) {
LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));

View File

@ -0,0 +1,23 @@
Index: open-vm-tools-9.4.6-1770165/modules/linux/vmhgfs/page.c
===================================================================
--- open-vm-tools-9.4.6-1770165.orig/modules/linux/vmhgfs/page.c
+++ open-vm-tools-9.4.6-1770165/modules/linux/vmhgfs/page.c
@@ -1444,9 +1444,18 @@ HgfsWbRequestUnlock(HgfsWbPage *req) //
LOG(6, (KERN_WARNING "VMware Hgfs: HgfsWbRequestUnlock: Invalid unlock attempted\n"));
return;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
smp_mb__before_clear_bit();
+#else
+ smp_mb__before_atomic();
+#endif
clear_bit(PG_BUSY, &req->wb_flags);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
smp_mb__after_clear_bit();
+#else
+ smp_mb__after_atomic();
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
wake_up_bit(&req->wb_flags, PG_BUSY);
#else

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jan 5 10:07:50 UTC 2015 - dimstar@opensuse.org
- Add open-vm-tools-3.17.7.patch: Fix building of vmhgfs with
Kernel 3.17.7+.
- Add open-vm-tools-3.18.0.patch: Fix building of vmhgfs with
Kernel 3.18.0+.
-------------------------------------------------------------------
Mon Jan 5 08:42:04 UTC 2015 - dimstar@opensuse.org

View File

@ -78,6 +78,8 @@ Patch6: 0006-Fix-vmxnet-module-on-kernels-3.16.patch
Patch7: 0007-Fix-vmhgfs-module-on-kernels-3.16.patch
Patch8: 0008-Fix-segfault-in-vmhgfs.patch
Patch10: open-vm-tools-linux-3.17.patch
Patch11: open-vm-tools-linux-3.17.7.patch
Patch12: open-vm-tools-linux-3.18.0.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
# don't use pkgconfig(gtk+-2.0) so we can build on SLE
@ -230,6 +232,8 @@ sed -i -e "s/\r//" README
%patch7 -p2
%patch8 -p2
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build
%if ! %{KMP}