aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-12-15 02:19:20 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-12-15 02:19:20 +0100
commitd36fef6f5aa4a6a1f44490455393a5b22137a6cd (patch)
tree3053df2fc30949b706f976dae3e31de2b8e9c04d /drivers
parent8f29e650bffc1e22ed6b2d0b321bc77627f3bb7a (diff)
[PATCH] ide-disk: flush cache after calling del_gendisk()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index f4e3d3527b0..449522f0540 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;