aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/gc.c')
-rw-r--r--fs/jffs2/gc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c
index a5ef9814f165..23587f8a221f 100644
--- a/fs/jffs2/gc.c
+++ b/fs/jffs2/gc.c
@@ -700,7 +700,7 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_
700 struct jffs2_full_dnode *new_fn; 700 struct jffs2_full_dnode *new_fn;
701 struct jffs2_raw_inode ri; 701 struct jffs2_raw_inode ri;
702 struct jffs2_node_frag *last_frag; 702 struct jffs2_node_frag *last_frag;
703 jint16_t dev; 703 union jffs2_device_node dev;
704 char *mdata = NULL, mdatalen = 0; 704 char *mdata = NULL, mdatalen = 0;
705 uint32_t alloclen, phys_ofs, ilen; 705 uint32_t alloclen, phys_ofs, ilen;
706 int ret; 706 int ret;
@@ -708,11 +708,8 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_
708 if (S_ISBLK(JFFS2_F_I_MODE(f)) || 708 if (S_ISBLK(JFFS2_F_I_MODE(f)) ||
709 S_ISCHR(JFFS2_F_I_MODE(f)) ) { 709 S_ISCHR(JFFS2_F_I_MODE(f)) ) {
710 /* For these, we don't actually need to read the old node */ 710 /* For these, we don't actually need to read the old node */
711 /* FIXME: for minor or major > 255. */ 711 mdatalen = jffs2_encode_dev(&dev, JFFS2_F_I_RDEV(f));
712 dev = cpu_to_je16(((JFFS2_F_I_RDEV_MAJ(f) << 8) |
713 JFFS2_F_I_RDEV_MIN(f)));
714 mdata = (char *)&dev; 712 mdata = (char *)&dev;
715 mdatalen = sizeof(dev);
716 D1(printk(KERN_DEBUG "jffs2_garbage_collect_metadata(): Writing %d bytes of kdev_t\n", mdatalen)); 713 D1(printk(KERN_DEBUG "jffs2_garbage_collect_metadata(): Writing %d bytes of kdev_t\n", mdatalen));
717 } else if (S_ISLNK(JFFS2_F_I_MODE(f))) { 714 } else if (S_ISLNK(JFFS2_F_I_MODE(f))) {
718 mdatalen = fn->size; 715 mdatalen = fn->size;