diff options
Diffstat (limited to 'fs/jffs2/gc.c')
-rw-r--r-- | fs/jffs2/gc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 967fb2cf8e21..77d30707de56 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c | |||
@@ -679,7 +679,7 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ | |||
679 | struct jffs2_full_dnode *new_fn; | 679 | struct jffs2_full_dnode *new_fn; |
680 | struct jffs2_raw_inode ri; | 680 | struct jffs2_raw_inode ri; |
681 | struct jffs2_node_frag *last_frag; | 681 | struct jffs2_node_frag *last_frag; |
682 | jint16_t dev; | 682 | union jffs2_device_node dev; |
683 | char *mdata = NULL, mdatalen = 0; | 683 | char *mdata = NULL, mdatalen = 0; |
684 | uint32_t alloclen, phys_ofs, ilen; | 684 | uint32_t alloclen, phys_ofs, ilen; |
685 | int ret; | 685 | int ret; |
@@ -687,11 +687,8 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ | |||
687 | if (S_ISBLK(JFFS2_F_I_MODE(f)) || | 687 | if (S_ISBLK(JFFS2_F_I_MODE(f)) || |
688 | S_ISCHR(JFFS2_F_I_MODE(f)) ) { | 688 | S_ISCHR(JFFS2_F_I_MODE(f)) ) { |
689 | /* For these, we don't actually need to read the old node */ | 689 | /* For these, we don't actually need to read the old node */ |
690 | /* FIXME: for minor or major > 255. */ | 690 | mdatalen = jffs2_encode_dev(&dev, JFFS2_F_I_RDEV(f)); |
691 | dev = cpu_to_je16(((JFFS2_F_I_RDEV_MAJ(f) << 8) | | ||
692 | JFFS2_F_I_RDEV_MIN(f))); | ||
693 | mdata = (char *)&dev; | 691 | mdata = (char *)&dev; |
694 | mdatalen = sizeof(dev); | ||
695 | D1(printk(KERN_DEBUG "jffs2_garbage_collect_metadata(): Writing %d bytes of kdev_t\n", mdatalen)); | 692 | D1(printk(KERN_DEBUG "jffs2_garbage_collect_metadata(): Writing %d bytes of kdev_t\n", mdatalen)); |
696 | } else if (S_ISLNK(JFFS2_F_I_MODE(f))) { | 693 | } else if (S_ISLNK(JFFS2_F_I_MODE(f))) { |
697 | mdatalen = fn->size; | 694 | mdatalen = fn->size; |