mirror of https://gitee.com/openkylin/linux.git
[PATCH] ide-disk: flush cache after calling del_gendisk()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
8f29e650bf
commit
d36fef6f5a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue