yaffs: By default route all writes into the yaffs cache
[yaffs2.git] / yaffs_guts.c
index 1602c4bde572e538482953ee10bff65d1624b5d9..79568eeeae39eb20d171226afc015cedbda75e5d 100644 (file)
@@ -3559,9 +3559,11 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
                }
 
                if (n_copy != dev->data_bytes_per_chunk ||
+                   !dev->param.cache_bypass_aligned ||
                    dev->param.inband_tags) {
                        /* An incomplete start or end chunk (or maybe both
                         * start and end chunk), or we're using inband tags,
+                        * or we're forcing writes through the cache,
                         * so we want to use the cache buffers.
                         */
                        if (dev->param.n_caches > 0) {