summaryrefslogtreecommitdiff
path: root/target/linux/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-06-15 22:25:05 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2015-06-16 07:52:50 +0200
commitfce581abdc768bdf252b4093b7843db7013d2691 (patch)
tree3831f1816373930d66ab1f2d0041d86b3c295940 /target/linux/patches
parent764e7ba4b2756652886af574f14e271251a0450e (diff)
update yaffs2 patch, fix compile issue
Diffstat (limited to 'target/linux/patches')
-rw-r--r--target/linux/patches/3.14.43/yaffs2.patch962
1 files changed, 487 insertions, 475 deletions
diff --git a/target/linux/patches/3.14.43/yaffs2.patch b/target/linux/patches/3.14.43/yaffs2.patch
index f075aa658..30e4a790e 100644
--- a/target/linux/patches/3.14.43/yaffs2.patch
+++ b/target/linux/patches/3.14.43/yaffs2.patch
@@ -1,6 +1,6 @@
-diff -Nur linux-3.14.4.orig/fs/Kconfig linux-3.14.4/fs/Kconfig
---- linux-3.14.4.orig/fs/Kconfig 2014-05-13 13:33:14.000000000 +0200
-+++ linux-3.14.4/fs/Kconfig 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/Kconfig linux-3.14.43/fs/Kconfig
+--- linux-3.14.43.orig/fs/Kconfig 2015-05-17 18:54:01.000000000 +0200
++++ linux-3.14.43/fs/Kconfig 2015-06-15 21:20:48.000000000 +0200
@@ -189,6 +189,7 @@
source "fs/befs/Kconfig"
source "fs/bfs/Kconfig"
@@ -9,17 +9,17 @@ diff -Nur linux-3.14.4.orig/fs/Kconfig linux-3.14.4/fs/Kconfig
source "fs/jffs2/Kconfig"
# UBIFS File system configuration
source "fs/ubifs/Kconfig"
-diff -Nur linux-3.14.4.orig/fs/Makefile linux-3.14.4/fs/Makefile
---- linux-3.14.4.orig/fs/Makefile 2014-05-13 13:33:14.000000000 +0200
-+++ linux-3.14.4/fs/Makefile 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/Makefile linux-3.14.43/fs/Makefile
+--- linux-3.14.43.orig/fs/Makefile 2015-05-17 18:54:01.000000000 +0200
++++ linux-3.14.43/fs/Makefile 2015-06-15 21:20:48.000000000 +0200
@@ -125,3 +125,4 @@
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_YAFFS_FS) += yaffs2/
-diff -Nur linux-3.14.4.orig/fs/yaffs2/Kconfig linux-3.14.4/fs/yaffs2/Kconfig
---- linux-3.14.4.orig/fs/yaffs2/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/Kconfig 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/Kconfig linux-3.14.43/fs/yaffs2/Kconfig
+--- linux-3.14.43.orig/fs/yaffs2/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/Kconfig 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,171 @@
+#
+# yaffs file system configurations
@@ -192,9 +192,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/Kconfig linux-3.14.4/fs/yaffs2/Kconfig
+ help
+ If this is set then yaffs2 will provide xattr support.
+ If unsure, say Y.
-diff -Nur linux-3.14.4.orig/fs/yaffs2/Makefile linux-3.14.4/fs/yaffs2/Makefile
---- linux-3.14.4.orig/fs/yaffs2/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/Makefile 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/Makefile linux-3.14.43/fs/yaffs2/Makefile
+--- linux-3.14.43.orig/fs/yaffs2/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/Makefile 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,18 @@
+#
+# Makefile for the linux YAFFS filesystem routines.
@@ -214,9 +214,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/Makefile linux-3.14.4/fs/yaffs2/Makefile
+yaffs-y += yaffs_summary.o
+yaffs-y += yaffs_verify.o
+
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.c linux-3.14.4/fs/yaffs2/yaffs_allocator.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_allocator.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_allocator.c linux-3.14.43/fs/yaffs2/yaffs_allocator.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_allocator.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_allocator.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,357 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
@@ -575,9 +575,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.c linux-3.14.4/fs/yaffs2/y
+ }
+}
+
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.h linux-3.14.4/fs/yaffs2/yaffs_allocator.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_allocator.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_allocator.h linux-3.14.43/fs/yaffs2/yaffs_allocator.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_allocator.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_allocator.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,30 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -609,10 +609,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_allocator.h linux-3.14.4/fs/yaffs2/y
+void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.4/fs/yaffs2/yaffs_attribs.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_attribs.c 2014-05-17 02:22:30.000000000 +0200
-@@ -0,0 +1,166 @@
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.43/fs/yaffs2/yaffs_attribs.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_attribs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_attribs.c 2015-06-15 21:20:48.000000000 +0200
+@@ -0,0 +1,132 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
@@ -629,46 +629,12 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.4/fs/yaffs2/yaf
+#include "yaffs_guts.h"
+#include "yaffs_attribs.h"
+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
-+static inline uid_t ia_uid_read(const struct iattr *iattr)
-+{
-+ return from_kuid(&init_user_ns, iattr->ia_uid);
-+}
-+
-+static inline gid_t ia_gid_read(const struct iattr *iattr)
-+{
-+ return from_kgid(&init_user_ns, iattr->ia_gid);
-+}
-+
-+static inline void ia_uid_write(struct iattr *iattr, uid_t uid)
-+{
-+ iattr->ia_uid = make_kuid(&init_user_ns, uid);
-+}
-+
-+static inline void ia_gid_write(struct iattr *iattr, gid_t gid)
-+{
-+ iattr->ia_gid = make_kgid(&init_user_ns, gid);
-+}
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
++#define IATTR_UID ia_uid
++#define IATTR_GID ia_gid
+#else
-+static inline uid_t ia_uid_read(const struct iattr *iattr)
-+{
-+ return iattr->ia_uid;
-+}
-+
-+static inline gid_t ia_gid_read(const struct iattr *inode)
-+{
-+ return iattr->ia_gid;
-+}
-+
-+static inline void ia_uid_write(struct iattr *iattr, uid_t uid)
-+{
-+ iattr->ia_uid = uid;
-+}
-+
-+static inline void ia_gid_write(struct iattr *iattr, gid_t gid)
-+{
-+ iattr->ia_gid = gid;
-+}
++#define IATTR_UID ia_uid.val
++#define IATTR_GID ia_gid.val
+#endif
+
+void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
@@ -734,9 +700,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.4/fs/yaffs2/yaf
+ if (valid & ATTR_MODE)
+ obj->yst_mode = attr->ia_mode;
+ if (valid & ATTR_UID)
-+ obj->yst_uid = ia_uid_read(attr);
++ obj->yst_uid = attr->IATTR_UID;
+ if (valid & ATTR_GID)
-+ obj->yst_gid = ia_gid_read(attr);
++ obj->yst_gid = attr->IATTR_GID;
+
+ if (valid & ATTR_ATIME)
+ obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime);
@@ -760,9 +726,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.4/fs/yaffs2/yaf
+
+ attr->ia_mode = obj->yst_mode;
+ valid |= ATTR_MODE;
-+ ia_uid_write(attr, obj->yst_uid);
++ attr->IATTR_UID = obj->yst_uid;
+ valid |= ATTR_UID;
-+ ia_gid_write(attr, obj->yst_gid);
++ attr->IATTR_GID = obj->yst_gid;
+ valid |= ATTR_GID;
+
+ Y_TIME_CONVERT(attr->ia_atime) = obj->yst_atime;
@@ -779,9 +745,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.c linux-3.14.4/fs/yaffs2/yaf
+
+ return YAFFS_OK;
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.h linux-3.14.4/fs/yaffs2/yaffs_attribs.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_attribs.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_attribs.h linux-3.14.43/fs/yaffs2/yaffs_attribs.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_attribs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_attribs.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -811,9 +777,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_attribs.h linux-3.14.4/fs/yaffs2/yaf
+int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.c linux-3.14.4/fs/yaffs2/yaffs_bitmap.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_bitmap.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_bitmap.c linux-3.14.43/fs/yaffs2/yaffs_bitmap.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_bitmap.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_bitmap.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
@@ -912,9 +878,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.c linux-3.14.4/fs/yaffs2/yaff
+
+ return n;
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.h linux-3.14.4/fs/yaffs2/yaffs_bitmap.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_bitmap.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_bitmap.h linux-3.14.43/fs/yaffs2/yaffs_bitmap.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_bitmap.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_bitmap.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,33 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -949,10 +915,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_bitmap.h linux-3.14.4/fs/yaffs2/yaff
+int yaffs_count_chunk_bits(struct yaffs_dev *dev, int blk);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/yaffs_checkptrw.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_checkptrw.c 2014-05-17 02:22:30.000000000 +0200
-@@ -0,0 +1,474 @@
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.43/fs/yaffs2/yaffs_checkptrw.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_checkptrw.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_checkptrw.c 2015-06-15 21:20:48.000000000 +0200
+@@ -0,0 +1,466 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
@@ -1192,8 +1158,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ dev->blocks_in_checkpt = 0;
+ dev->checkpt_max_blocks =
+ (dev->internal_end_block - dev->internal_start_block) / 16 + 2;
-+ dev->checkpt_block_list =
-+ kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
++ if (!dev->checkpt_block_list)
++ dev->checkpt_block_list =
++ kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
+
+ if (!dev->checkpt_block_list)
+ return 0;
@@ -1303,7 +1270,6 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
+{
+ int i = 0;
-+ int ok = 1;
+ struct yaffs_ext_tags tags;
+ int chunk;
+ int offset_chunk;
@@ -1315,7 +1281,7 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ if (dev->checkpt_open_write)
+ return -1;
+
-+ while (i < n_bytes && ok) {
++ while (i < n_bytes) {
+
+ if (dev->checkpt_byte_offs < 0 ||
+ dev->checkpt_byte_offs >= dev->data_bytes_per_chunk) {
@@ -1325,10 +1291,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ dev->checkpt_cur_chunk = 0;
+ }
+
-+ if (dev->checkpt_cur_block < 0) {
-+ ok = 0;
++ /* Bail out if we can't find a checpoint block */
++ if (dev->checkpt_cur_block < 0)
+ break;
-+ }
+
+ chunk = dev->checkpt_cur_block *
+ dev->param.chunks_per_block +
@@ -1337,22 +1302,21 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ offset_chunk = apply_chunk_offset(dev, chunk);
+ dev->n_page_reads++;
+
-+ /* read in the next chunk */
++ /* Read in the next chunk */
+ dev->tagger.read_chunk_tags_fn(dev,
+ offset_chunk,
+ dev->checkpt_buffer,
+ &tags);
+
++ /* Bail out if the chunk is corrupted. */
+ if (tags.chunk_id != (dev->checkpt_page_seq + 1) ||
+ tags.ecc_result > YAFFS_ECC_RESULT_FIXED ||
-+ tags.seq_number != YAFFS_SEQUENCE_CHECKPOINT_DATA) {
-+ ok = 0;
++ tags.seq_number != YAFFS_SEQUENCE_CHECKPOINT_DATA)
+ break;
-+ }
-+ if(!yaffs2_checkpt_check_chunk_hdr(dev)) {
-+ ok = 0;
++
++ /* Bail out if it is not a checkpoint chunk. */
++ if(!yaffs2_checkpt_check_chunk_hdr(dev))
+ break;
-+ }
+
+ dev->checkpt_page_seq++;
+ dev->checkpt_cur_chunk++;
@@ -1372,7 +1336,7 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ dev->checkpt_byte_count++;
+ }
+
-+ return i;
++ return i; /* Number of bytes read */
+}
+
+int yaffs_checkpt_close(struct yaffs_dev *dev)
@@ -1396,8 +1360,6 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ if (bi && bi->block_state == YAFFS_BLOCK_STATE_EMPTY)
+ bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT;
+ }
-+ kfree(dev->checkpt_block_list);
-+ dev->checkpt_block_list = NULL;
+ }
+
+ dev->n_free_chunks -=
@@ -1407,14 +1369,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+ yaffs_trace(YAFFS_TRACE_CHECKPOINT, "checkpoint byte count %d",
+ dev->checkpt_byte_count);
+
-+ if (dev->checkpt_buffer) {
-+ /* free the buffer */
-+ kfree(dev->checkpt_buffer);
-+ dev->checkpt_buffer = NULL;
++ if (dev->checkpt_buffer)
+ return 1;
-+ } else {
++ else
+ return 0;
-+ }
+}
+
+int yaffs2_checkpt_invalidate_stream(struct yaffs_dev *dev)
@@ -1427,9 +1385,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.c linux-3.14.4/fs/yaffs2/y
+
+ return yaffs_checkpt_erase(dev);
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.h linux-3.14.4/fs/yaffs2/yaffs_checkptrw.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_checkptrw.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_checkptrw.h linux-3.14.43/fs/yaffs2/yaffs_checkptrw.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_checkptrw.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_checkptrw.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,33 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -1464,9 +1422,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_checkptrw.h linux-3.14.4/fs/yaffs2/y
+int yaffs2_checkpt_invalidate_stream(struct yaffs_dev *dev);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.c linux-3.14.4/fs/yaffs2/yaffs_ecc.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_ecc.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_ecc.c linux-3.14.43/fs/yaffs2/yaffs_ecc.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_ecc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_ecc.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,281 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
@@ -1749,9 +1707,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.c linux-3.14.4/fs/yaffs2/yaffs_e
+
+ return -1;
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.h linux-3.14.4/fs/yaffs2/yaffs_ecc.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_ecc.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_ecc.h linux-3.14.43/fs/yaffs2/yaffs_ecc.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_ecc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_ecc.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -1797,9 +1755,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_ecc.h linux-3.14.4/fs/yaffs2/yaffs_e
+ struct yaffs_ecc_other *read_ecc,
+ const struct yaffs_ecc_other *test_ecc);
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_getblockinfo.h linux-3.14.4/fs/yaffs2/yaffs_getblockinfo.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_getblockinfo.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_getblockinfo.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_getblockinfo.h linux-3.14.43/fs/yaffs2/yaffs_getblockinfo.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_getblockinfo.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_getblockinfo.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,35 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -1836,10 +1794,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_getblockinfo.h linux-3.14.4/fs/yaffs
+}
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_guts.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_guts.c 2014-05-17 02:22:30.000000000 +0200
-@@ -0,0 +1,5146 @@
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_guts.c linux-3.14.43/fs/yaffs2/yaffs_guts.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_guts.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_guts.c 2015-06-15 21:20:48.000000000 +0200
+@@ -0,0 +1,5140 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
@@ -2473,6 +2431,78 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+
+/*---------------- Name handling functions ------------*/
+
++static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR *name,
++ const YCHAR *oh_name, int buff_size)
++{
++#ifdef CONFIG_YAFFS_AUTO_UNICODE
++ if (dev->param.auto_unicode) {
++ if (*oh_name) {
++ /* It is an ASCII name, do an ASCII to
++ * unicode conversion */
++ const char *ascii_oh_name = (const char *)oh_name;
++ int n = buff_size - 1;
++ while (n > 0 && *ascii_oh_name) {
++ *name = *ascii_oh_name;
++ name++;
++ ascii_oh_name++;
++ n--;
++ }
++ } else {
++ strncpy(name, oh_name + 1, buff_size - 1);
++ }
++ } else {
++#else
++ (void) dev;
++ {
++#endif
++ strncpy(name, oh_name, buff_size - 1);
++ }
++}
++
++static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR *oh_name,
++ const YCHAR *name)
++{
++#ifdef CONFIG_YAFFS_AUTO_UNICODE
++
++ int is_ascii;
++ const YCHAR *w;
++
++ if (dev->param.auto_unicode) {
++
++ is_ascii = 1;
++ w = name;
++
++ /* Figure out if the name will fit in ascii character set */
++ while (is_ascii && *w) {
++ if ((*w) & 0xff00)
++ is_ascii = 0;
++ w++;
++ }
++
++ if (is_ascii) {
++ /* It is an ASCII name, so convert unicode to ascii */
++ char *ascii_oh_name = (char *)oh_name;
++ int n = YAFFS_MAX_NAME_LENGTH - 1;
++ while (n > 0 && *name) {
++ *ascii_oh_name = *name;
++ name++;
++ ascii_oh_name++;
++ n--;
++ }
++ } else {
++ /* Unicode name, so save starting at the second YCHAR */
++ *oh_name = 0;
++ strncpy(oh_name + 1, name, YAFFS_MAX_NAME_LENGTH - 2);
++ }
++ } else {
++#else
++ dev = dev;
++ {
++#endif
++ strncpy(oh_name, name, YAFFS_MAX_NAME_LENGTH - 1);
++ }
++}
++
+static u16 yaffs_calc_name_sum(const YCHAR *name)
+{
+ u16 sum = 0;
@@ -3219,56 +3249,49 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ return 0;
+}
+
-+static void yaffs_flush_file_cache(struct yaffs_obj *obj)
++static void yaffs_flush_single_cache(struct yaffs_cache *cache, int discard)
++{
++
++ if (!cache || cache->locked)
++ return;
++
++ /* Write it out and free it up if need be.*/
++ if (cache->dirty) {
++ yaffs_wr_data_obj(cache->object,
++ cache->chunk_id,
++ cache->data,
++ cache->n_bytes,
++ 1);
++
++ cache->dirty = 0;
++ }
++
++ if (discard)
++ cache->object = NULL;
++}
++
++static void yaffs_flush_file_cache(struct yaffs_obj *obj, int discard)
+{
+ struct yaffs_dev *dev = obj->my_dev;
-+ int lowest = -99; /* Stop compiler whining. */
+ int i;
+ struct yaffs_cache *cache;
-+ int chunk_written = 0;
+ int n_caches = obj->my_dev->param.n_caches;
+
+ if (n_caches < 1)
+ return;
-+ do {
-+ cache = NULL;
-+
-+ /* Find the lowest dirty chunk for this object */
-+ for (i = 0; i < n_caches; i++) {
-+ if (dev->cache[i].object == obj &&
-+ dev->cache[i].dirty) {
-+ if (!cache ||
-+ dev->cache[i].chunk_id < lowest) {
-+ cache = &dev->cache[i];
-+ lowest = cache->chunk_id;
-+ }
-+ }
-+ }
+
-+ if (cache && !cache->locked) {
-+ /* Write it out and free it up */
-+ chunk_written =
-+ yaffs_wr_data_obj(cache->object,
-+ cache->chunk_id,
-+ cache->data,
-+ cache->n_bytes, 1);
-+ cache->dirty = 0;
-+ cache->object = NULL;
-+ }
-+ } while (cache && chunk_written > 0);
+
-+ if (cache)
-+ /* Hoosterman, disk full while writing cache out. */
-+ yaffs_trace(YAFFS_TRACE_ERROR,
-+ "yaffs tragedy: no space during cache write");
++ /* Find the chunks for this object and flush them. */
++ for (i = 0; i < n_caches; i++) {
++ cache = &dev->cache[i];
++ if (cache->object == obj)
++ yaffs_flush_single_cache(cache, discard);
++ }
++
+}
+
-+/*yaffs_flush_whole_cache(dev)
-+ *
-+ *
-+ */
+
-+void yaffs_flush_whole_cache(struct yaffs_dev *dev)
++void yaffs_flush_whole_cache(struct yaffs_dev *dev, int discard)
+{
+ struct yaffs_obj *obj;
+ int n_caches = dev->param.n_caches;
@@ -3284,12 +3307,12 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ obj = dev->cache[i].object;
+ }
+ if (obj)
-+ yaffs_flush_file_cache(obj);
++ yaffs_flush_file_cache(obj, discard);
+ } while (obj);
+
+}
+
-+/* Grab us a cache chunk for use.
++/* Grab us an unused cache chunk for use.
+ * First look for an empty one.
+ * Then look for the least recently used non-dirty one.
+ * Then look for the least recently used dirty one...., flush and look again.
@@ -3304,56 +3327,50 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ return &dev->cache[i];
+ }
+ }
++
+ return NULL;
+}
+
+static struct yaffs_cache *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
+{
+ struct yaffs_cache *cache;
-+ struct yaffs_obj *the_obj;
+ int usage;
+ int i;
-+ int pushout;
+
+ if (dev->param.n_caches < 1)
+ return NULL;
+
-+ /* Try find a non-dirty one... */
++ /* First look for an unused cache */
+
+ cache = yaffs_grab_chunk_worker(dev);
+
-+ if (!cache) {
-+ /* They were all dirty, find the LRU object and flush
-+ * its cache, then find again.
-+ * NB what's here is not very accurate,
-+ * we actually flush the object with the LRU chunk.
-+ */
++ if (cache)
++ return cache;
+
-+ /* With locking we can't assume we can use entry zero,
-+ * Set the_obj to a valid pointer for Coverity. */
-+ the_obj = dev->cache[0].object;
-+ usage = -1;
-+ cache = NULL;
-+ pushout = -1;
++ /*
++ * Thery were all in use.
++ * Find the LRU cache and flush it if it is dirty.
++ */
+
-+ for (i = 0; i < dev->param.n_caches; i++) {
-+ if (dev->cache[i].object &&
-+ !dev->cache[i].locked &&
-+ (dev->cache[i].last_use < usage ||
-+ !cache)) {
++ usage = -1;
++ cache = NULL;
++
++ for (i = 0; i < dev->param.n_caches; i++) {
++ if (dev->cache[i].object &&
++ !dev->cache[i].locked &&
++ (dev->cache[i].last_use < usage || !cache)) {
+ usage = dev->cache[i].last_use;
-+ the_obj = dev->cache[i].object;
+ cache = &dev->cache[i];
-+ pushout = i;
-+ }
-+ }
-+
-+ if (!cache || cache->dirty) {
-+ /* Flush and try again */
-+ yaffs_flush_file_cache(the_obj);
-+ cache = yaffs_grab_chunk_worker(dev);
+ }
+ }
++
++#if 1
++ yaffs_flush_single_cache(cache, 1);
++#else
++ yaffs_flush_file_cache(cache->object, 1);
++ cache = yaffs_grab_chunk_worker(dev);
++#endif
++
+ return cache;
+}
+
@@ -3705,21 +3722,18 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ struct list_head *i;
+ u32 n = (u32) bucket;
+
-+ /* Now find an object value that has not already been taken
-+ * by scanning the list.
++ /*
++ * Now find an object value that has not already been taken
++ * by scanning the list, incrementing each time by number of buckets.
+ */
-+
+ while (!found) {
+ found = 1;
+ n += YAFFS_NOBJECT_BUCKETS;
-+ if (1 || dev->obj_bucket[bucket].count > 0) {
-+ list_for_each(i, &dev->obj_bucket[bucket].list) {
-+ /* If there is already one in the list */
-+ if (i && list_entry(i, struct yaffs_obj,
-+ hash_link)->obj_id == n) {
-+ found = 0;
-+ }
-+ }
++ list_for_each(i, &dev->obj_bucket[bucket].list) {
++ /* Check if this value is already taken. */
++ if (i && list_entry(i, struct yaffs_obj,
++ hash_link)->obj_id == n)
++ found = 0;
+ }
+ }
+ return n;
@@ -5031,78 +5045,6 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ yaffs_release_temp_buffer(dev, buf);
+}
+
-+static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR *name,
-+ const YCHAR *oh_name, int buff_size)
-+{
-+#ifdef CONFIG_YAFFS_AUTO_UNICODE
-+ if (dev->param.auto_unicode) {
-+ if (*oh_name) {
-+ /* It is an ASCII name, do an ASCII to
-+ * unicode conversion */
-+ const char *ascii_oh_name = (const char *)oh_name;
-+ int n = buff_size - 1;
-+ while (n > 0 && *ascii_oh_name) {
-+ *name = *ascii_oh_name;
-+ name++;
-+ ascii_oh_name++;
-+ n--;
-+ }
-+ } else {
-+ strncpy(name, oh_name + 1, buff_size - 1);
-+ }
-+ } else {
-+#else
-+ (void) dev;
-+ {
-+#endif
-+ strncpy(name, oh_name, buff_size - 1);
-+ }
-+}
-+
-+static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR *oh_name,
-+ const YCHAR *name)
-+{
-+#ifdef CONFIG_YAFFS_AUTO_UNICODE
-+
-+ int is_ascii;
-+ YCHAR *w;
-+
-+ if (dev->param.auto_unicode) {
-+
-+ is_ascii = 1;
-+ w = name;
-+
-+ /* Figure out if the name will fit in ascii character set */
-+ while (is_ascii && *w) {
-+ if ((*w) & 0xff00)
-+ is_ascii = 0;
-+ w++;
-+ }
-+
-+ if (is_ascii) {
-+ /* It is an ASCII name, so convert unicode to ascii */
-+ char *ascii_oh_name = (char *)oh_name;
-+ int n = YAFFS_MAX_NAME_LENGTH - 1;
-+ while (n > 0 && *name) {
-+ *ascii_oh_name = *name;
-+ name++;
-+ ascii_oh_name++;
-+ n--;
-+ }
-+ } else {
-+ /* Unicode name, so save starting at the second YCHAR */
-+ *oh_name = 0;
-+ strncpy(oh_name + 1, name, YAFFS_MAX_NAME_LENGTH - 2);
-+ }
-+ } else {
-+#else
-+ dev = dev;
-+ {
-+#endif
-+ strncpy(oh_name, name, YAFFS_MAX_NAME_LENGTH - 1);
-+ }
-+}
-+
+/* UpdateObjectHeader updates the header on NAND for an object.
+ * If name is not NULL, then that new name is used.
+ */
@@ -5607,7 +5549,7 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ struct yaffs_dev *dev = in->my_dev;
+ loff_t old_size = in->variant.file_variant.file_size;
+
-+ yaffs_flush_file_cache(in);
++ yaffs_flush_file_cache(in, 1);
+ yaffs_invalidate_whole_cache(in);
+
+ yaffs_check_gc(dev, 0);
@@ -5640,12 +5582,15 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ return YAFFS_OK;
+}
+
-+int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
++int yaffs_flush_file(struct yaffs_obj *in,
++ int update_time,
++ int data_sync,
++ int discard_cache)
+{
+ if (!in->dirty)
+ return YAFFS_OK;
+
-+ yaffs_flush_file_cache(in);
++ yaffs_flush_file_cache(in, discard_cache);
+
+ if (data_sync)
+ return YAFFS_OK;
@@ -6874,8 +6819,15 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+
+ kfree(dev->gc_cleanup_list);
+
-+ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++)
++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
+ kfree(dev->temp_buffer[i].buffer);
++ dev->temp_buffer[i].buffer = NULL;
++ }
++
++ kfree(dev->checkpt_buffer);
++ dev->checkpt_buffer = NULL;
++ kfree(dev->checkpt_block_list);
++ dev->checkpt_block_list = NULL;
+
+ dev->is_mounted = 0;
+
@@ -6986,10 +6938,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.c linux-3.14.4/fs/yaffs2/yaffs_
+ bs[s]++;
+ }
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.h linux-3.14.4/fs/yaffs2/yaffs_guts.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_guts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_guts.h 2014-05-17 02:22:30.000000000 +0200
-@@ -0,0 +1,1007 @@
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_guts.h linux-3.14.43/fs/yaffs2/yaffs_guts.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_guts.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_guts.h 2015-06-15 21:20:48.000000000 +0200
+@@ -0,0 +1,1010 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
@@ -7868,10 +7820,13 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.h linux-3.14.4/fs/yaffs2/yaffs_
+ const YCHAR *name, u32 mode, u32 uid,
+ u32 gid);
+
-+int yaffs_flush_file(struct yaffs_obj *obj, int update_time, int data_sync);
++int yaffs_flush_file(struct yaffs_obj *in,
++ int update_time,
++ int data_sync,
++ int discard_cache);
+
+/* Flushing and checkpointing */
-+void yaffs_flush_whole_cache(struct yaffs_dev *dev);
++void yaffs_flush_whole_cache(struct yaffs_dev *dev, int discard);
+
+int yaffs_checkpoint_save(struct yaffs_dev *dev);
+int yaffs_checkpoint_restore(struct yaffs_dev *dev);
@@ -7997,9 +7952,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_guts.h linux-3.14.4/fs/yaffs2/yaffs_
+ struct yaffs_ext_tags *tags);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_linux.h linux-3.14.4/fs/yaffs2/yaffs_linux.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_linux.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_linux.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_linux.h linux-3.14.43/fs/yaffs2/yaffs_linux.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_linux.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_linux.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,48 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -8049,10 +8004,10 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_linux.h linux-3.14.4/fs/yaffs2/yaffs
+#endif
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.c linux-3.14.4/fs/yaffs2/yaffs_mtdif.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_mtdif.c 2014-05-17 02:22:30.000000000 +0200
-@@ -0,0 +1,309 @@
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_mtdif.c linux-3.14.43/fs/yaffs2/yaffs_mtdif.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_mtdif.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_mtdif.c 2015-06-15 21:20:48.000000000 +0200
+@@ -0,0 +1,310 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
@@ -8073,17 +8028,18 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.c linux-3.14.4/fs/yaffs2/yaffs
+#include "linux/mtd/mtd.h"
+#include "linux/types.h"
+#include "linux/time.h"
-+#include "linux/major.h"
+#include "linux/mtd/nand.h"
+#include "linux/kernel.h"
+#include "linux/version.h"
+#include "linux/types.h"
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
++#include "uapi/linux/major.h"
++#endif
+
+#include "yaffs_trace.h"
+#include "yaffs_guts.h"
+#include "yaffs_linux.h"
+
-+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0))
+#define MTD_OPS_AUTO_OOB MTD_OOB_AUTO
+#endif
@@ -8362,9 +8318,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.c linux-3.14.4/fs/yaffs2/yaffs
+ if(mtd)
+ put_mtd_device(mtd);
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.h linux-3.14.4/fs/yaffs2/yaffs_mtdif.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_mtdif.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_mtdif.h linux-3.14.43/fs/yaffs2/yaffs_mtdif.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_mtdif.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_mtdif.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,25 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -8391,9 +8347,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_mtdif.h linux-3.14.4/fs/yaffs2/yaffs
+void yaffs_put_mtd_device(struct mtd_info *mtd);
+int yaffs_verify_mtd(struct mtd_info *mtd, int yaffs_version, int inband_tags);
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.c linux-3.14.4/fs/yaffs2/yaffs_nameval.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_nameval.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_nameval.c linux-3.14.43/fs/yaffs2/yaffs_nameval.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_nameval.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_nameval.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,208 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
@@ -8603,9 +8559,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.c linux-3.14.4/fs/yaffs2/yaf
+{
+ return nval_used(xb, xb_size) > 0;
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.h linux-3.14.4/fs/yaffs2/yaffs_nameval.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_nameval.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_nameval.h linux-3.14.43/fs/yaffs2/yaffs_nameval.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_nameval.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_nameval.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,28 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -8635,9 +8591,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nameval.h linux-3.14.4/fs/yaffs2/yaf
+int nval_list(const char *xb, int xb_size, char *buf, int bsize);
+int nval_hasvalues(const char *xb, int xb_size);
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nand.c linux-3.14.4/fs/yaffs2/yaffs_nand.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_nand.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_nand.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_nand.c linux-3.14.43/fs/yaffs2/yaffs_nand.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_nand.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_nand.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,122 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
@@ -8761,9 +8717,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nand.c linux-3.14.4/fs/yaffs2/yaffs_
+ return dev->drv.drv_deinitialise_fn(dev);
+ return YAFFS_OK;
+}
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nand.h linux-3.14.4/fs/yaffs2/yaffs_nand.h
---- linux-3.14.4.orig/fs/yaffs2/yaffs_nand.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_nand.h 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_nand.h linux-3.14.43/fs/yaffs2/yaffs_nand.h
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_nand.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_nand.h 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,39 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
@@ -8804,9 +8760,9 @@ diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_nand.h linux-3.14.4/fs/yaffs2/yaffs_
+int yaffs_deinit_nand(struct yaffs_dev *dev);
+
+#endif
-diff -Nur linux-3.14.4.orig/fs/yaffs2/yaffs_packedtags1.c linux-3.14.4/fs/yaffs2/yaffs_packedtags1.c
---- linux-3.14.4.orig/fs/yaffs2/yaffs_packedtags1.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-3.14.4/fs/yaffs2/yaffs_packedtags1.c 2014-05-17 02:22:30.000000000 +0200
+diff -Nur linux-3.14.43.orig/fs/yaffs2/yaffs_packedtags1.c linux-3.14.43/fs/yaffs2/yaffs_packedtags1.c
+--- linux-3.14.43.orig/fs/yaffs2/yaffs_packedtags1.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-3.14.43/fs/yaffs2/yaffs_packedtags1.c 2015-06-15 21:20:48.000000000 +0200
@@ -0,0 +1,56 @@
+/*
+ * Y