From: Bartlomiej Zolnierkiewicz Date: Thu, 15 Dec 2005 01:19:20 +0000 (+0100) Subject: [PATCH] ide-disk: flush cache after calling del_gendisk() X-Git-Tag: v2.6.15-rc6~56^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d36fef6f5aa4a6a1f44490455393a5b22137a6cd;p=linux-2.6 [PATCH] ide-disk: flush cache after calling del_gendisk() Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index f4e3d3527b..449522f054 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -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;