--- parted/parted.c.orig 2009-02-15 10:28:57.000000000 -0600 +++ parted/parted.c 2009-02-15 10:30:57.000000000 -0600 @@ -1799,21 +1799,15 @@ goto error_destroy_constraint; ped_partition_set_system (part, NULL); } else { - fs = ped_file_system_open (&part->geom); - if (!fs) - goto error_destroy_disk; - constraint = constraint_intersect_and_destroy ( - ped_file_system_get_resize_constraint (fs), - constraint_from_start_end ( - *dev, range_start, range_end)); - if (!ped_disk_set_partition_geom (disk, part, constraint, + /* Patch note: + * this code is similar to this in the if block, but I didn't + * put them together to keep the original structure. + */ + constraint = constraint_from_start_end (*dev, + range_start, range_end); + if (!ped_disk_set_partition_geom (disk, part, constraint, new_geom.start, new_geom.end)) - goto error_close_fs; - if (!ped_file_system_resize (fs, &part->geom, g_timer)) - goto error_close_fs; - /* may have changed... eg fat16 -> fat32 */ - ped_partition_set_system (part, fs->type); - ped_file_system_close (fs); + goto error_destroy_constraint; } ped_disk_commit (disk);