[PATCH] ide-disk: flush cache after calling del_gendisk()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2005-12-15 02:19:20 +01:00
parent 8f29e650bf
commit d36fef6f5a

View file

@ -1034,12 +1034,12 @@ static int ide_disk_remove(struct device *dev)
struct ide_disk_obj *idkp = drive->driver_data;
struct gendisk *g = idkp->disk;
ide_cacheflush_p(drive);
ide_unregister_subdriver(drive, idkp->driver);
del_gendisk(g);
ide_cacheflush_p(drive);
ide_disk_put(idkp);
return 0;