diff options
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r-- | fs/jffs2/wbuf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 8c06d3a2b17d..86860dbc670c 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * For licensing information, see the file 'LICENCE' in this directory. | 10 | * For licensing information, see the file 'LICENCE' in this directory. |
11 | * | 11 | * |
12 | * $Id: wbuf.c,v 1.97 2005/08/06 04:51:30 nico Exp $ | 12 | * $Id: wbuf.c,v 1.98 2005/09/07 08:34:55 havasi Exp $ |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
@@ -265,7 +265,7 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) | |||
265 | 265 | ||
266 | 266 | ||
267 | /* ... and get an allocation of space from a shiny new block instead */ | 267 | /* ... and get an allocation of space from a shiny new block instead */ |
268 | ret = jffs2_reserve_space_gc(c, end-start, &ofs, &len); | 268 | ret = jffs2_reserve_space_gc(c, end-start, &ofs, &len, JFFS2_SUMMARY_NOSUM_SIZE); |
269 | if (ret) { | 269 | if (ret) { |
270 | printk(KERN_WARNING "Failed to allocate space for wbuf recovery. Data loss ensues.\n"); | 270 | printk(KERN_WARNING "Failed to allocate space for wbuf recovery. Data loss ensues.\n"); |
271 | kfree(buf); | 271 | kfree(buf); |
@@ -836,6 +836,12 @@ int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, unsig | |||
836 | alldone: | 836 | alldone: |
837 | *retlen = donelen; | 837 | *retlen = donelen; |
838 | 838 | ||
839 | if (jffs2_sum_active()) { | ||
840 | int res = jffs2_sum_add_kvec(c, invecs, count, (uint32_t) to); | ||
841 | if (res) | ||
842 | return res; | ||
843 | } | ||
844 | |||
839 | if (c->wbuf_len && ino) | 845 | if (c->wbuf_len && ino) |
840 | jffs2_wbuf_dirties_inode(c, ino); | 846 | jffs2_wbuf_dirties_inode(c, ino); |
841 | 847 | ||
@@ -855,7 +861,7 @@ int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *r | |||
855 | struct kvec vecs[1]; | 861 | struct kvec vecs[1]; |
856 | 862 | ||
857 | if (!jffs2_is_writebuffered(c)) | 863 | if (!jffs2_is_writebuffered(c)) |
858 | return c->mtd->write(c->mtd, ofs, len, retlen, buf); | 864 | return jffs2_flash_direct_write(c, ofs, len, retlen, buf); |
859 | 865 | ||
860 | vecs[0].iov_base = (unsigned char *) buf; | 866 | vecs[0].iov_base = (unsigned char *) buf; |
861 | vecs[0].iov_len = len; | 867 | vecs[0].iov_len = len; |