diff options
Diffstat (limited to 'drivers/block/genhd.c')
-rw-r--r-- | drivers/block/genhd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index ab4db71375e0..8bbe01d4b487 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -14,6 +14,7 @@ #include <linux/slab.h> #include <linux/kmod.h> #include <linux/kobj_map.h> +#include <linux/buffer_head.h> #define MAX_PROBE_HASH 255 /* random */ @@ -676,7 +677,8 @@ int invalidate_partition(struct gendisk *disk, int index) int res = 0; struct block_device *bdev = bdget_disk(disk, index); if (bdev) { - res = __invalidate_device(bdev, 1); + fsync_bdev(bdev); + res = __invalidate_device(bdev); bdput(bdev); } return res; |