diff options
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r-- | fs/jffs2/scan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 79638f56c5ea..2bfdc33752d3 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c | |||
@@ -332,10 +332,8 @@ static int jffs2_scan_xattr_node(struct jffs2_sb_info *c, struct jffs2_erasebloc | |||
332 | xid = je32_to_cpu(rx->xid); | 332 | xid = je32_to_cpu(rx->xid); |
333 | version = je32_to_cpu(rx->version); | 333 | version = je32_to_cpu(rx->version); |
334 | 334 | ||
335 | totlen = sizeof(struct jffs2_raw_xattr); | 335 | totlen = PAD(sizeof(struct jffs2_raw_xattr) |
336 | if (version != XDATUM_DELETE_MARKER) | 336 | + rx->name_len + 1 + je16_to_cpu(rx->value_len)); |
337 | totlen += rx->name_len + 1 + je16_to_cpu(rx->value_len); | ||
338 | totlen = PAD(totlen); | ||
339 | if (totlen != je32_to_cpu(rx->totlen)) { | 337 | if (totlen != je32_to_cpu(rx->totlen)) { |
340 | JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%u\n", | 338 | JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%u\n", |
341 | ofs, je32_to_cpu(rx->totlen), totlen); | 339 | ofs, je32_to_cpu(rx->totlen), totlen); |