aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 06:37:31 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 06:37:31 -0400
commit4cbb9b80e171107c6c34116283fe38e5a396c68b (patch)
tree9463f2e4774f14752cf4bb52431e14e569256f72 /fs/jffs2/scan.c
parent6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (diff)
parent9fe4854cd1f60273f9a3ece053f4789605f58a5e (diff)
Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index cffafec01e48..6fce703c0543 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -361,9 +361,9 @@ static int jffs2_scan_xattr_node(struct jffs2_sb_info *c, struct jffs2_erasebloc
361 xd->node = raw; 361 xd->node = raw;
362 362
363 raw->flash_offset = ofs | REF_PRISTINE; 363 raw->flash_offset = ofs | REF_PRISTINE;
364 raw->next_in_ino = (void *)xd;
365 364
366 jffs2_link_node_ref(c, jeb, raw, totlen); 365 jffs2_link_node_ref(c, jeb, raw, totlen, NULL);
366 /* FIXME */ raw->next_in_ino = (void *)xd;
367 367
368 if (jffs2_sum_active()) 368 if (jffs2_sum_active())
369 jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset); 369 jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset);
@@ -425,9 +425,9 @@ static int jffs2_scan_xref_node(struct jffs2_sb_info *c, struct jffs2_eraseblock
425 c->xref_temp = ref; 425 c->xref_temp = ref;
426 426
427 raw->flash_offset = ofs | REF_PRISTINE; 427 raw->flash_offset = ofs | REF_PRISTINE;
428 raw->next_in_ino = (void *)ref;
429 428
430 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(rr->totlen))); 429 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(rr->totlen)), NULL);
430 /* FIXME */ raw->next_in_ino = (void *)ref;
431 431
432 if (jffs2_sum_active()) 432 if (jffs2_sum_active())
433 jffs2_sum_add_xref_mem(s, rr, ofs - jeb->offset); 433 jffs2_sum_add_xref_mem(s, rr, ofs - jeb->offset);
@@ -844,10 +844,9 @@ scan_more:
844 printk(KERN_NOTICE "Failed to allocate node ref for clean marker\n"); 844 printk(KERN_NOTICE "Failed to allocate node ref for clean marker\n");
845 return -ENOMEM; 845 return -ENOMEM;
846 } 846 }
847 marker_ref->next_in_ino = NULL;
848 marker_ref->flash_offset = ofs | REF_NORMAL; 847 marker_ref->flash_offset = ofs | REF_NORMAL;
849 848
850 jffs2_link_node_ref(c, jeb, marker_ref, c->cleanmarker_size); 849 jffs2_link_node_ref(c, jeb, marker_ref, c->cleanmarker_size, NULL);
851 850
852 ofs += PAD(c->cleanmarker_size); 851 ofs += PAD(c->cleanmarker_size);
853 } 852 }
@@ -892,8 +891,7 @@ scan_more:
892 if (!ref) 891 if (!ref)
893 return -ENOMEM; 892 return -ENOMEM;
894 ref->flash_offset = ofs | REF_PRISTINE; 893 ref->flash_offset = ofs | REF_PRISTINE;
895 ref->next_in_ino = 0; 894 jffs2_link_node_ref(c, jeb, ref, PAD(je32_to_cpu(node->totlen)), NULL);
896 jffs2_link_node_ref(c, jeb, ref, PAD(je32_to_cpu(node->totlen)));
897 895
898 /* We can't summarise nodes we don't grok */ 896 /* We can't summarise nodes we don't grok */
899 jffs2_sum_disable_collecting(s); 897 jffs2_sum_disable_collecting(s);
@@ -1004,10 +1002,7 @@ static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_erasebloc
1004 1002
1005 raw->flash_offset = ofs | REF_UNCHECKED; 1003 raw->flash_offset = ofs | REF_UNCHECKED;
1006 1004
1007 raw->next_in_ino = ic->nodes; 1005 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(ri->totlen)), ic);
1008 ic->nodes = raw;
1009
1010 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(ri->totlen)));
1011 1006
1012 D1(printk(KERN_DEBUG "Node is ino #%u, version %d. Range 0x%x-0x%x\n", 1007 D1(printk(KERN_DEBUG "Node is ino #%u, version %d. Range 0x%x-0x%x\n",
1013 je32_to_cpu(ri->ino), je32_to_cpu(ri->version), 1008 je32_to_cpu(ri->ino), je32_to_cpu(ri->version),
@@ -1082,10 +1077,7 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo
1082 } 1077 }
1083 1078
1084 raw->flash_offset = ofs | REF_PRISTINE; 1079 raw->flash_offset = ofs | REF_PRISTINE;
1085 raw->next_in_ino = ic->nodes; 1080 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(rd->totlen)), ic);
1086 ic->nodes = raw;
1087
1088 jffs2_link_node_ref(c, jeb, raw, PAD(je32_to_cpu(rd->totlen)));
1089 1081
1090 fd->raw = raw; 1082 fd->raw = raw;
1091 fd->next = NULL; 1083 fd->next = NULL;