backport jffs2 eof detect changes from 2.6