[Yaffs] [PATCH] Exporting yaffs by nfs for the 2.5.9+ kernel…

Top Page
Attachments:
Message as email
+ (text/plain)
+ exporting_yaffs_by_nfs.patch (text/x-patch)
Delete this message
Reply to this message
Author: Gregory CLEMENT
Date:  
To: yaffs
Subject: [Yaffs] [PATCH] Exporting yaffs by nfs for the 2.5.9+ kernels
Hi all,
This is the new patch allowing exporting yaffs by nfs for the 2.5.9+ kernels.
Hope it will be ok.

--
Gregory CLEMENT
Adeneo
This patch allow exporting yaffs by nfs for the 2.5.9+ kernels.

Signed-off-by: Gregory CLEMENT <>

Index: linux-2.6.16/fs/yaffs2/yaffs_fs.c
===================================================================
--- linux-2.6.16/fs/yaffs2/yaffs_fs.c    9 Jun 2006 06:42:34 -0000    1.1
+++ linux-2.6.16/fs/yaffs2/yaffs_fs.c    7 Sep 2006 13:05:47 -0000
@@ -216,6 +216,13 @@
     .clear_inode = yaffs_clear_inode,
 };


+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,9))
+/* Just declare a zero structure as a NULL value implies  
+ * using the default functions of expfs.
+ */
+static struct export_operations yaffs_export_ops;
+#endif
+
 static void yaffs_GrossLock(yaffs_Device * dev)
 {
     T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs locking\n"));
@@ -1321,7 +1328,9 @@


     sb->s_magic = YAFFS_MAGIC;
     sb->s_op = &yaffs_super_ops;
-
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,9))
+    sb->s_export_op = &yaffs_export_ops;
+#endif
     if (!sb)
         printk(KERN_INFO "yaffs: sb is NULL\n");
     else if (!sb->s_dev)