yaffs: Fix directory unlinking in yaffs1 mode
authorCharles Manning <cdhmanning@gmail.com>
Wed, 2 Feb 2011 16:55:30 +0000 (05:55 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Wed, 2 Feb 2011 16:55:30 +0000 (05:55 +1300)
Treat both yaffs2 and yaffs1 paths the same.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_guts.c

index e876309..2fcb80b 100644 (file)
@@ -1344,13 +1344,7 @@ static int yaffs_change_obj_name(struct yaffs_obj *obj,
                BUG();
        }
 
-       /* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */
-       if (obj->my_dev->param.is_yaffs2)
-               unlink_op = (new_dir == obj->my_dev->unlinked_dir);
-       else
-               unlink_op = (new_dir == obj->my_dev->unlinked_dir
-                            && obj->variant_type == YAFFS_OBJECT_TYPE_FILE);
-
+       unlink_op = (new_dir == obj->my_dev->unlinked_dir);
        del_op = (new_dir == obj->my_dev->del_dir);
 
        existing_target = yaffs_find_by_name(new_dir, new_name);