-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile-vmhgfs.patch
More file actions
59 lines (56 loc) · 1.71 KB
/
file-vmhgfs.patch
File metadata and controls
59 lines (56 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- /usr/lib/vmware-tools/modules/source/vmhgfs-only/file.c
+++ /usr/lib/vmware-tools/modules/source/vmhgfs-only/file.c
@@ -75,7 +75,6 @@
static int HgfsOpen(struct inode *inode,
struct file *file);
#if defined VMW_USE_AIO
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
static ssize_t HgfsAioRead(struct kiocb *iocb,
const struct iovec *iov,
unsigned long numSegs,
@@ -84,7 +83,6 @@
const struct iovec *iov,
unsigned long numSegs,
loff_t offset);
+# endif
#else
static ssize_t HgfsRead(struct file *file,
char __user *buf,
@@ -151,20 +149,15 @@
.open = HgfsOpen,
.llseek = HgfsSeek,
.flush = HgfsFlush,
-#if defined VMW_USE_AIO
+#ifdef VMW_USE_AIO
.read = do_sync_read,
.write = do_sync_write,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
+ .read_iter = generic_file_read_iter,
+ .write_iter = generic_file_write_iter,
+# else
.aio_read = HgfsAioRead,
.aio_write = HgfsAioWrite,
-#else
+#endif
+#else /* !VMW_USE_AIO */
.read = HgfsRead,
.write = HgfsWrite,
-#endif
+#endif /* !VMW_USE_AIO */
.fsync = HgfsFsync,
.mmap = HgfsMmap,
.release = HgfsRelease,
@@ -672,7 +665,6 @@
#if defined VMW_USE_AIO
+# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
/*
*----------------------------------------------------------------------
*
@@ -815,7 +807,7 @@
return result;
}
-
+# endif /* if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) */
#else
/*
*----------------------------------------------------------------------