]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ide-disk: flush cache after calling del_gendisk()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 15 Dec 2005 01:19:20 +0000 (02:19 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 15 Dec 2005 01:19:20 +0000 (02:19 +0100)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-disk.c

index f4e3d3527b0e6f5e5cdf12f2a8e8da47e7082e1d..449522f0540c20d77b1957cd224021ce39bc5f9e 100644 (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;