diff options
Diffstat (limited to 'drivers')
-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 42dfa281a880..f0c1084b840f 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, | |||
3345 | struct block_device *bdev = opened_bdev[cnt]; | 3345 | struct block_device *bdev = opened_bdev[cnt]; |
3346 | if (!bdev || ITYPE(drive_state[cnt].fd_device) != type) | 3346 | if (!bdev || ITYPE(drive_state[cnt].fd_device) != type) |
3347 | continue; | 3347 | continue; |
3348 | __invalidate_device(bdev, 0); | 3348 | __invalidate_device(bdev); |
3349 | } | 3349 | } |
3350 | up(&open_lock); | 3350 | up(&open_lock); |
3351 | } else { | 3351 | } else { |
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 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/kmod.h> | 15 | #include <linux/kmod.h> |
16 | #include <linux/kobj_map.h> | 16 | #include <linux/kobj_map.h> |
17 | #include <linux/buffer_head.h> | ||
17 | 18 | ||
18 | #define MAX_PROBE_HASH 255 /* random */ | 19 | #define MAX_PROBE_HASH 255 /* random */ |
19 | 20 | ||
@@ -676,7 +677,8 @@ int invalidate_partition(struct gendisk *disk, int index) | |||
676 | int res = 0; | 677 | int res = 0; |
677 | struct block_device *bdev = bdget_disk(disk, index); | 678 | struct block_device *bdev = bdget_disk(disk, index); |
678 | if (bdev) { | 679 | if (bdev) { |
679 | res = __invalidate_device(bdev, 1); | 680 | fsync_bdev(bdev); |
681 | res = __invalidate_device(bdev); | ||
680 | bdput(bdev); | 682 | bdput(bdev); |
681 | } | 683 | } |
682 | return res; | 684 | return res; |