diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/genhd.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 42dfa281a88..f0c1084b840 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3345,7 +3345,7 @@ static inline int set_geometry(unsigned int cmd, struct floppy_struct *g, struct block_device *bdev = opened_bdev[cnt]; if (!bdev || ITYPE(drive_state[cnt].fd_device) != type) continue; - __invalidate_device(bdev, 0); + __invalidate_device(bdev); } up(&open_lock); } else { diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index ab4db71375e..8bbe01d4b48 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; |