Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 526636 | Differences between
and this patch

Collapse All | Expand All

(-)a/open-vm-tools/modules/linux/shared/compat_fs.h (-1 / +2 lines)
Lines 89-95 Link Here
89
 * changed over time, so for simplicity, we'll only enable it from 2.6.19 and
89
 * changed over time, so for simplicity, we'll only enable it from 2.6.19 and
90
 * on.
90
 * on.
91
 */
91
 */
92
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
92
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && \
93
         LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
93
# define VMW_USE_AIO
94
# define VMW_USE_AIO
94
#endif
95
#endif
95
96
(-)a/open-vm-tools/modules/linux/vmhgfs/file.c (-12 / +12 lines)
Lines 76-82 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)
80
static ssize_t HgfsAioRead(struct kiocb *iocb,
79
static ssize_t HgfsAioRead(struct kiocb *iocb,
81
                           const struct iovec *iov,
80
                           const struct iovec *iov,
82
                           unsigned long numSegs,
81
                           unsigned long numSegs,
Lines 85-91 static ssize_t HgfsAioWrite(struct kiocb *iocb, Link Here
85
                            const struct iovec *iov,
84
                            const struct iovec *iov,
86
                            unsigned long numSegs,
85
                            unsigned long numSegs,
87
                            loff_t offset);
86
                            loff_t offset);
88
#  endif
89
#else
87
#else
90
static ssize_t HgfsRead(struct file *file,
88
static ssize_t HgfsRead(struct file *file,
91
                        char __user *buf,
89
                        char __user *buf,
Lines 155-168 struct file_operations HgfsFileFileOperations = { Link Here
155
#ifdef VMW_USE_AIO
153
#ifdef VMW_USE_AIO
156
   .read       = do_sync_read,
154
   .read       = do_sync_read,
157
   .write      = do_sync_write,
155
   .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
162
   .aio_read   = HgfsAioRead,
156
   .aio_read   = HgfsAioRead,
163
   .aio_write  = HgfsAioWrite,
157
   .aio_write  = HgfsAioWrite,
164
#   endif
165
#else /* !VMW_USE_AIO */
158
#else /* !VMW_USE_AIO */
159
#  if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
160
   .read_iter = generic_file_read_iter,
161
   .write_iter = generic_file_write_iter,
162
# endif
166
   .read       = HgfsRead,
163
   .read       = HgfsRead,
167
   .write      = HgfsWrite,
164
   .write      = HgfsWrite,
168
#endif /* !VMW_USE_AIO */
165
#endif /* !VMW_USE_AIO */
Lines 755-761 out: Link Here
755
752
756
753
757
#if defined VMW_USE_AIO
754
#if defined VMW_USE_AIO
758
#  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
759
/*
755
/*
760
 *----------------------------------------------------------------------
756
 *----------------------------------------------------------------------
761
 *
757
 *
Lines 890-897 out: Link Here
890
   spin_unlock(&writeDentry->d_inode->i_lock);
886
   spin_unlock(&writeDentry->d_inode->i_lock);
891
   return result;
887
   return result;
892
}
888
}
893
894
#   endif /* if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) */
895
#else
889
#else
896
/*
890
/*
897
 *----------------------------------------------------------------------
891
 *----------------------------------------------------------------------
Lines 933-940 HgfsRead(struct file *file, // IN: File to read from Link Here
933
      LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRead: invalid dentry\n"));
927
      LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRead: invalid dentry\n"));
934
      goto out;
928
      goto out;
935
   }
929
   }
936
930
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
931
   result = new_sync_read(file, buf, count, offset);
932
#else
937
   result = generic_file_read(file, buf, count, offset);
933
   result = generic_file_read(file, buf, count, offset);
934
#endif
938
  out:
935
  out:
939
   return result;
936
   return result;
940
}
937
}
Lines 985-991 HgfsWrite(struct file *file, // IN: File to write to Link Here
985
      goto out;
982
      goto out;
986
   }
983
   }
987
984
985
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
986
   result = new_sync_write(file, buf, count, offset);
987
#else
988
   result = generic_file_write(file, buf, count, offset);
988
   result = generic_file_write(file, buf, count, offset);
989
#endif
989
  out:
990
  out:
990
   return result;
991
   return result;
991
}
992
}
992
- 

Return to bug 526636