aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-21 08:13:45 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-21 08:13:45 -0400
commit9167e0f811cbe28564c44a99c2f07b0ce5b368cf (patch)
treeed98ccdf3b268bc577d6eefb0a76a87da8aa2496 /fs/jffs2
parent0bcc099d6d1a7b9fa2adf7c19812e4e816915e10 (diff)
[JFFS2] Remove stray kfree of summary info in XATTR code.
We don't allocate this locally any more -- it's given to us and owner by our caller. Also improve the debug messages a little. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/summary.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index e60289ada833..5a59c6188407 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -411,8 +411,9 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
411 411
412 ino = je32_to_cpu(spi->inode); 412 ino = je32_to_cpu(spi->inode);
413 413
414 dbg_summary("Inode at 0x%08x\n", 414 dbg_summary("Inode at 0x%08x-0x%08x\n",
415 jeb->offset + je32_to_cpu(spi->offset)); 415 jeb->offset + je32_to_cpu(spi->offset),
416 jeb->offset + je32_to_cpu(spi->offset) + je32_to_cpu(spu->totlen));
416 417
417 raw = alloc_ref_at(c, jeb, je32_to_cpu(spi->offset)); 418 raw = alloc_ref_at(c, jeb, je32_to_cpu(spi->offset));
418 if (!raw) { 419 if (!raw) {
@@ -446,7 +447,9 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
446 spd = sp; 447 spd = sp;
447 448
448 dbg_summary("Dirent at 0x%08x\n", 449 dbg_summary("Dirent at 0x%08x\n",
449 jeb->offset + je32_to_cpu(spd->offset)); 450 jeb->offset + je32_to_cpu(spd->offset),
451 jeb->offset + je32_to_cpu(spd->offset) + je32_to_cpu(spd->totlen));
452
450 453
451 fd = jffs2_alloc_full_dirent(spd->nsize+1); 454 fd = jffs2_alloc_full_dirent(spd->nsize+1);
452 if (!fd) 455 if (!fd)
@@ -496,13 +499,13 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
496 struct jffs2_sum_xattr_flash *spx; 499 struct jffs2_sum_xattr_flash *spx;
497 500
498 spx = (struct jffs2_sum_xattr_flash *)sp; 501 spx = (struct jffs2_sum_xattr_flash *)sp;
499 dbg_summary("xattr at %#08x (xid=%u, version=%u)\n", 502 dbg_summary("xattr at %#08x-%#08x (xid=%u, version=%u)\n",
500 jeb->offset + je32_to_cpu(spx->offset), 503 jeb->offset + je32_to_cpu(spx->offset),
504 jeb->offset + je32_to_cpu(spx->offset) + je32_to_cpu(spx->totlen),
501 je32_to_cpu(spx->xid), je32_to_cpu(spx->version)); 505 je32_to_cpu(spx->xid), je32_to_cpu(spx->version));
502 raw = alloc_ref_at(c, jeb, je32_to_cpu(spx->offset)); 506 raw = alloc_ref_at(c, jeb, je32_to_cpu(spx->offset));
503 if (!raw) { 507 if (!raw) {
504 JFFS2_NOTICE("allocation of node reference failed\n"); 508 JFFS2_NOTICE("allocation of node reference failed\n");
505 kfree(summary);
506 return -ENOMEM; 509 return -ENOMEM;
507 } 510 }
508 xd = jffs2_setup_xattr_datum(c, je32_to_cpu(spx->xid), 511 xd = jffs2_setup_xattr_datum(c, je32_to_cpu(spx->xid),
@@ -517,7 +520,6 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
517 break; 520 break;
518 } 521 }
519 JFFS2_NOTICE("allocation of xattr_datum failed\n"); 522 JFFS2_NOTICE("allocation of xattr_datum failed\n");
520 kfree(summary);
521 return PTR_ERR(xd); 523 return PTR_ERR(xd);
522 } 524 }
523 xd->node = raw; 525 xd->node = raw;
@@ -537,20 +539,19 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
537 struct jffs2_sum_xref_flash *spr; 539 struct jffs2_sum_xref_flash *spr;
538 540
539 spr = (struct jffs2_sum_xref_flash *)sp; 541 spr = (struct jffs2_sum_xref_flash *)sp;
540 dbg_summary("xref at %#08x (xid=%u, ino=%u)\n", 542 dbg_summary("xref at %#08x-%#08x\n",
541 jeb->offset + je32_to_cpu(spr->offset), 543 jeb->offset + je32_to_cpu(spr->offset),
542 je32_to_cpu(spr->xid), je32_to_cpu(spr->ino)); 544 jeb->offset + je32_to_cpu(spr->offset) + PAD(sizeof(struct jffs2_raw_xref)));
545
543 raw = alloc_ref_at(c, jeb, je32_to_cpu(spr->offset)); 546 raw = alloc_ref_at(c, jeb, je32_to_cpu(spr->offset));
544 if (!raw) { 547 if (!raw) {
545 JFFS2_NOTICE("allocation of node reference failed\n"); 548 JFFS2_NOTICE("allocation of node reference failed\n");
546 kfree(summary);
547 return -ENOMEM; 549 return -ENOMEM;
548 } 550 }
549 ref = jffs2_alloc_xattr_ref(); 551 ref = jffs2_alloc_xattr_ref();
550 if (!ref) { 552 if (!ref) {
551 JFFS2_NOTICE("allocation of xattr_datum failed\n"); 553 JFFS2_NOTICE("allocation of xattr_datum failed\n");
552 jffs2_free_raw_node_ref(raw); 554 jffs2_free_raw_node_ref(raw);
553 kfree(summary);
554 return -ENOMEM; 555 return -ENOMEM;
555 } 556 }
556 ref->ino = 0xfffffffe; 557 ref->ino = 0xfffffffe;