|
Lines 76-81
static int HgfsGetOpenFlags(uint32 flags);
Link Here
|
| 76 |
static int HgfsOpen(struct inode *inode, |
76 |
static int HgfsOpen(struct inode *inode, |
| 77 |
struct file *file); |
77 |
struct file *file); |
| 78 |
#if defined VMW_USE_AIO |
78 |
#if defined VMW_USE_AIO |
|
|
79 |
# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) |
| 79 |
static ssize_t HgfsAioRead(struct kiocb *iocb, |
80 |
static ssize_t HgfsAioRead(struct kiocb *iocb, |
| 80 |
const struct iovec *iov, |
81 |
const struct iovec *iov, |
| 81 |
unsigned long numSegs, |
82 |
unsigned long numSegs, |
|
Lines 84-89
static ssize_t HgfsAioWrite(struct kiocb *iocb,
Link Here
|
| 84 |
const struct iovec *iov, |
85 |
const struct iovec *iov, |
| 85 |
unsigned long numSegs, |
86 |
unsigned long numSegs, |
| 86 |
loff_t offset); |
87 |
loff_t offset); |
|
|
88 |
# endif |
| 87 |
#else |
89 |
#else |
| 88 |
static ssize_t HgfsRead(struct file *file, |
90 |
static ssize_t HgfsRead(struct file *file, |
| 89 |
char __user *buf, |
91 |
char __user *buf, |
|
Lines 150-164
struct file_operations HgfsFileFileOperations = {
Link Here
|
| 150 |
.open = HgfsOpen, |
152 |
.open = HgfsOpen, |
| 151 |
.llseek = HgfsSeek, |
153 |
.llseek = HgfsSeek, |
| 152 |
.flush = HgfsFlush, |
154 |
.flush = HgfsFlush, |
| 153 |
#if defined VMW_USE_AIO |
155 |
#ifdef VMW_USE_AIO |
| 154 |
.read = do_sync_read, |
156 |
.read = do_sync_read, |
| 155 |
.write = do_sync_write, |
157 |
.write = do_sync_write, |
|
|
158 |
# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) |
| 159 |
.read_iter = generic_file_read_iter, |
| 160 |
.write_iter = generic_file_write_iter, |
| 161 |
# else |
| 156 |
.aio_read = HgfsAioRead, |
162 |
.aio_read = HgfsAioRead, |
| 157 |
.aio_write = HgfsAioWrite, |
163 |
.aio_write = HgfsAioWrite, |
| 158 |
#else |
164 |
# endif |
|
|
165 |
#else /* !VMW_USE_AIO */ |
| 159 |
.read = HgfsRead, |
166 |
.read = HgfsRead, |
| 160 |
.write = HgfsWrite, |
167 |
.write = HgfsWrite, |
| 161 |
#endif |
168 |
#endif /* !VMW_USE_AIO */ |
| 162 |
.fsync = HgfsFsync, |
169 |
.fsync = HgfsFsync, |
| 163 |
.mmap = HgfsMmap, |
170 |
.mmap = HgfsMmap, |
| 164 |
.release = HgfsRelease, |
171 |
.release = HgfsRelease, |
|
Lines 748-753
out:
Link Here
|
| 748 |
|
755 |
|
| 749 |
|
756 |
|
| 750 |
#if defined VMW_USE_AIO |
757 |
#if defined VMW_USE_AIO |
|
|
758 |
# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) |
| 751 |
/* |
759 |
/* |
| 752 |
*---------------------------------------------------------------------- |
760 |
*---------------------------------------------------------------------- |
| 753 |
* |
761 |
* |
|
Lines 883-889
out:
Link Here
|
| 883 |
return result; |
891 |
return result; |
| 884 |
} |
892 |
} |
| 885 |
|
893 |
|
| 886 |
|
894 |
# endif /* if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) */ |
| 887 |
#else |
895 |
#else |
| 888 |
/* |
896 |
/* |
| 889 |
*---------------------------------------------------------------------- |
897 |
*---------------------------------------------------------------------- |
| 890 |
- |
|
|