+diff -urN linux-2.6.21.1/fs/Kconfig linux-2.6.21.1.new/fs/Kconfig
+--- linux-2.6.21.1/fs/Kconfig 2007-06-08 14:07:09.000000000 +0200
++++ linux-2.6.21.1.new/fs/Kconfig 2007-06-08 14:09:26.000000000 +0200
+@@ -419,6 +419,7 @@
+
+ source "fs/xfs/Kconfig"
+ source "fs/gfs2/Kconfig"
++source "fs/yaffs2/Kconfig"
+
+ config OCFS2_FS
+ tristate "OCFS2 file system support"
+diff -urN linux-2.6.21.1/fs/Makefile linux-2.6.21.1.new/fs/Makefile
+--- linux-2.6.21.1/fs/Makefile 2007-06-08 14:07:09.000000000 +0200
++++ linux-2.6.21.1.new/fs/Makefile 2007-06-08 14:09:51.000000000 +0200
+@@ -116,3 +116,4 @@
+ obj-$(CONFIG_DEBUG_FS) += debugfs/
+ obj-$(CONFIG_OCFS2_FS) += ocfs2/
+ obj-$(CONFIG_GFS2_FS) += gfs2/
++obj-$(CONFIG_YAFFS_FS) += yaffs2/
diff -urN linux-2.6.21.1/fs/yaffs2/Kconfig linux-2.6.21.1.new/fs/yaffs2/Kconfig
--- linux-2.6.21.1/fs/yaffs2/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/Kconfig 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/Kconfig 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,175 @@
+#
+# YAFFS file system configurations
+ If unsure, say Y.
diff -urN linux-2.6.21.1/fs/yaffs2/Makefile linux-2.6.21.1.new/fs/yaffs2/Makefile
--- linux-2.6.21.1/fs/yaffs2/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/Makefile 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/Makefile 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,11 @@
+#
+# Makefile for the linux YAFFS filesystem routines.
+yaffs-y += yaffs_mtdif.o yaffs_mtdif2.o
diff -urN linux-2.6.21.1/fs/yaffs2/devextras.h linux-2.6.21.1.new/fs/yaffs2/devextras.h
--- linux-2.6.21.1/fs/yaffs2/devextras.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/devextras.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/devextras.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,264 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/moduleconfig.h linux-2.6.21.1.new/fs/yaffs2/moduleconfig.h
--- linux-2.6.21.1/fs/yaffs2/moduleconfig.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/moduleconfig.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/moduleconfig.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,65 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif /* __YAFFS_CONFIG_H__ */
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_checkptrw.c linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_checkptrw.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.c 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,404 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_checkptrw.h linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_checkptrw.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_checkptrw.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,35 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_ecc.c linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_ecc.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.c 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,331 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_ecc.h linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_ecc.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_ecc.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_fs.c linux-2.6.21.1.new/fs/yaffs2/yaffs_fs.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_fs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_fs.c 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_fs.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,2278 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+MODULE_LICENSE("GPL");
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_guts.c linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_guts.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.c 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,7469 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_guts.h linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_guts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_guts.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,902 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif.c linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,241 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif.h linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1-compat.c linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1-compat.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1-compat.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1-compat.c 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1-compat.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,434 @@
+From ian@brightstareng.com Fri May 18 15:06:49 2007
+From ian@brightstareng.com Fri May 18 15:08:21 2007
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1.c linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.c 2007-05-30 13:17:16.000000000 +0200
-@@ -0,0 +1,339 @@
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.c 2007-06-08 14:07:26.000000000 +0200
+@@ -0,0 +1,363 @@
+/*
+ * YAFFS: Yet another FFS. A NAND-flash specific file system.
+ * yaffs_mtdif1.c NAND mtd interface functions for small-page NAND.
+#include "linux/mtd/mtd.h"
+
+/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
-+/* should really be >= .17, but elsewhere > .17 is used, so be consistent */
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
+
+const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.3 2007/05/15 20:16:11 ian Exp $";
+ compile_time_assertion(sizeof(yaffs_PackedTags1) == 12);
+ compile_time_assertion(sizeof(yaffs_Tags) == 8);
+
++ dev->nPageWrites++;
++
+ yaffs_PackTags1(&pt1, etags);
+ yaffs_CalcTagsECC((yaffs_Tags *)&pt1);
+
+ int retval;
+ int deleted;
+
++ dev->nPageReads++;
++
+ memset(&ops, 0, sizeof(ops));
+ ops.mode = MTD_OOB_AUTO;
+ ops.len = (data) ? chunkBytes : 0;
+ ops.datbuf = data;
+ ops.oobbuf = (__u8 *)&pt1;
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
++ /* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
++ * help it out with ops.len = ops.ooblen when ops.datbuf == NULL.
++ */
++ ops.len = (ops.datbuf) ? ops.len : ops.ooblen;
++#endif
+ /* Read page and oob using MTD.
+ * Check status and determine ECC result.
+ */
+ deleted = !pt1.deleted;
+ pt1.deleted = 1;
+#else
-+ (void) deleted; /* not used */
++ deleted = (yaffs_CountBits(((__u8 *)&pt1)[8]) < 7);
+#endif
+
+ /* Check the packed tags mini-ECC and correct if necessary/possible.
+ case 1:
+ /* recovered tags-ECC error */
+ dev->tagsEccFixed++;
-+ eccres = YAFFS_ECC_RESULT_FIXED;
++ if (eccres == YAFFS_ECC_RESULT_NO_ERROR)
++ eccres = YAFFS_ECC_RESULT_FIXED;
+ break;
+ default:
+ /* unrecovered tags-ECC error */
+ yaffs_UnpackTags1(etags, &pt1);
+ etags->eccResult = eccres;
+
-+ /* Set deleted state.
-+ */
-+#ifndef CONFIG_YAFFS_9BYTE_TAGS
++ /* Set deleted state */
+ etags->chunkDeleted = deleted;
-+#else
-+ etags->chunkDeleted = (yaffs_CountBits(((__u8 *)&pt1)[8]) < 7);
-+#endif
+ return YAFFS_OK;
+}
+
+ return (retval) ? YAFFS_FAIL : YAFFS_OK;
+}
+
++/* Check any MTD prerequists.
++ *
++ * Returns YAFFS_OK or YAFFS_FAIL.
++ */
++static int nandmtd1_TestPrerequists(struct mtd_info * mtd)
++{
++ /* 2.6.18 has mtd->ecclayout->oobavail */
++ /* 2.6.21 has mtd->ecclayout->oobavail and mtd->oobavail */
++ int oobavail = mtd->ecclayout->oobavail;
++
++ if (oobavail < YTAG1_SIZE) {
++ yaffs_trace(YAFFS_TRACE_ERROR,
++ "mtd device has only %d bytes for tags, need %d\n",
++ oobavail, YTAG1_SIZE);
++ return YAFFS_FAIL;
++ }
++ return YAFFS_OK;
++}
++
+/* Query for the current state of a specific block.
+ *
+ * Examine the tags of the first chunk of the block and return the state:
+ int state = YAFFS_BLOCK_STATE_DEAD;
+ int seqnum = 0;
+ int retval;
-+#if 0
-+ if (mtd->oobavail < YTAG1_SIZE) {
-+ yaffs_trace(YAFFS_TRACE_ERROR,
-+ "mtd device has only %d bytes for tags, need %d",
-+ mtd->oobavail, YTAG1_SIZE);
++
++ /* We don't yet have a good place to test for MTD config prerequists.
++ * Do it here as we are called during the initial scan.
++ */
++ if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK) {
+ return YAFFS_FAIL;
+ }
-+#endif
++
+ retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags);
+ if (etags.blockBad) {
+ yaffs_trace(YAFFS_TRACE_BAD_BLOCKS,
+#endif /*KERNEL_VERSION*/
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1.h linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif1.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif1.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * YAFFS: Yet another Flash File System. A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif2.c linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif2.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,232 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_mtdif2.h linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_mtdif2.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_mtdif2.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,29 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_nand.c linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_nand.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,134 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_nand.h linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_nand.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nand.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_nandemul2k.h linux-2.6.21.1.new/fs/yaffs2/yaffs_nandemul2k.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_nandemul2k.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nandemul2k.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_nandemul2k.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_packedtags1.c linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_packedtags1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.c 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,52 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_packedtags1.h linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_packedtags1.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags1.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,37 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_packedtags2.c linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_packedtags2.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.c 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,182 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_packedtags2.h linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_packedtags2.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_packedtags2.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,38 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_qsort.c linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_qsort.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.c 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 1992, 1993
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_qsort.h linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_qsort.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_qsort.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,23 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_tagscompat.c linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_tagscompat.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.c 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,530 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_tagscompat.h linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_tagscompat.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagscompat.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,40 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_tagsvalidity.c linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.c
--- linux-2.6.21.1/fs/yaffs2/yaffs_tagsvalidity.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.c 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.c 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+}
diff -urN linux-2.6.21.1/fs/yaffs2/yaffs_tagsvalidity.h linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.h
--- linux-2.6.21.1/fs/yaffs2/yaffs_tagsvalidity.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffs_tagsvalidity.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,24 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yaffsinterface.h linux-2.6.21.1.new/fs/yaffs2/yaffsinterface.h
--- linux-2.6.21.1/fs/yaffs2/yaffsinterface.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yaffsinterface.h 2007-05-30 13:17:16.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yaffsinterface.h 2007-06-08 14:07:26.000000000 +0200
@@ -0,0 +1,21 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
diff -urN linux-2.6.21.1/fs/yaffs2/yportenv.h linux-2.6.21.1.new/fs/yaffs2/yportenv.h
--- linux-2.6.21.1/fs/yaffs2/yportenv.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21.1.new/fs/yaffs2/yportenv.h 2007-05-30 13:17:17.000000000 +0200
++++ linux-2.6.21.1.new/fs/yaffs2/yportenv.h 2007-06-08 14:07:27.000000000 +0200
@@ -0,0 +1,186 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+#endif
+
+#endif
---- linux-2.6.21.1/fs/Makefile 2007-05-30 13:16:21.000000000 +0200
-+++ linux-2.6.21.1.new/fs/Makefile 2007-05-30 13:27:34.000000000 +0200
-@@ -116,3 +116,4 @@
- obj-$(CONFIG_DEBUG_FS) += debugfs/
- obj-$(CONFIG_OCFS2_FS) += ocfs2/
- obj-$(CONFIG_GFS2_FS) += gfs2/
-+obj-$(CONFIG_YAFFS_FS) += yaffs2/
---- linux-2.6.21.1/fs/Kconfig 2007-05-30 13:16:21.000000000 +0200
-+++ linux-2.6.21.1.new/fs/Kconfig 2007-05-30 13:29:14.000000000 +0200
-@@ -419,6 +419,7 @@
-
- source "fs/xfs/Kconfig"
- source "fs/gfs2/Kconfig"
-+source "fs/yaffs2/Kconfig"
-
- config OCFS2_FS
- tristate "OCFS2 file system support"