All pastes #274358 Raw Edit

jMCg

public text v1 · immutable
·published 2006-12-10 17:34 UTC
rendered paste body
Index: kfusd/kfusd.c
===================================================================
--- kfusd/kfusd.c       (revision 8)
+++ kfusd/kfusd.c       (working copy)
@@ -57,7 +57,11 @@
 #include <linux/modversions.h>
 #endif
 
+#include <linux/version.h>
+/* config.h has been removed from 2.6.18+ thus including version.h first */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
 #include <linux/config.h>
+#endif
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -68,7 +72,6 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/poll.h>
-#include <linux/version.h>
 #include <linux/major.h>
 #include <linux/uio.h>
 #include <linux/cdev.h>
@@ -2308,11 +2311,12 @@
 }
 
 
-STATIC ssize_t fusd_writev(struct file *file,
+STATIC ssize_t fusd_writev(struct kiocb *iocb,
                           const struct iovec *iov,
                           unsigned long count,
                           loff_t *offset)
 {
+   struct file *file = iocb->ki_filp;
   if (count != 2) {
     RDEBUG(2, "fusd_writev: got illegal iov count of %ld", count);
     return -EINVAL;
@@ -2509,7 +2513,7 @@
   open:     fusd_open,
   read:     fusd_read,
   write:    fusd_write,
-  writev:   fusd_writev,
+  aio_write:   fusd_writev,
   release:  fusd_release,
   poll:     fusd_poll,
 };