Commit 2cdd5908 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] fix for rescan_partitions()

Check for ->bd_invalidate moved from rescan_partitions() to the only caller
that
	a) needs that check and
	b) doesn't do it already.

Fixes the problem with BLKRRPART which doesn't want that check at all...
parent d4a81d32
......@@ -520,7 +520,7 @@ int full_check_disk_change(struct block_device *bdev)
if (bdev->bd_contains != bdev)
BUG();
down(&bdev->bd_sem);
if (check_disk_change(bdev)) {
if (check_disk_change(bdev) && bdev->bd_invalidated) {
rescan_partitions(bdev->bd_disk, bdev);
res = 1;
}
......
......@@ -449,8 +449,6 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
struct parsed_partitions *state;
int p, res;
if (!bdev->bd_invalidated)
return 0;
if (bdev->bd_part_count)
return -EBUSY;
res = invalidate_device(dev, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment