Skip to contentSkip to conversation

mtd_blkdevs.c missing flush_dcache_page()

DISCUSSION Matthew Reimer 2 participants 2 messages Oct 18, 2005 – Oct 19, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Matthew Reimer

mreimer> I came across this post in which RMK says mtd_blkdevs.c is mreimer> missing a call to flush_dcache_page(), patch included:

mreimer> http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-May/029023.html

mreimer> I suppose not calling flush_dcache_page() could result in mreimer> file corruption.

mreimer> Should this patch be applied?

Yes. Without this patch, I saw file corruption on following conditions:

* CPU have dcache aliasing
* use ext2 (etc. not jffs2 neither cramfs) on /dev/mtdblock
* mmap and read a file in the filesystem

I tested this patch on MIPS and it works fine.

---
Atsushi Nemoto