*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: writev.c,v 1.7 2005/09/07 08:34:55 havasi Exp $
+ * $Id: writev.c,v 1.8 2005/09/09 15:11:58 havasi Exp $
*
*/
int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen)
{
- if (c->mtd->writev)
- return c->mtd->writev(c->mtd, vecs, count, to, retlen);
- else {
+ if (!jffs2_is_writebuffered(c)) {
if (jffs2_sum_active()) {
int res;
-
res = jffs2_sum_add_kvec(c, vecs, count, (uint32_t) to);
if (res) {
return res;
}
}
+ }
+ if (c->mtd->writev)
+ return c->mtd->writev(c->mtd, vecs, count, to, retlen);
+ else {
return mtd_fake_writev(c->mtd, vecs, count, to, retlen);
}
}