diff options
| author | Alexander Viro <viro@math.psu.edu> | 2002-11-17 03:04:33 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-17 03:04:33 -0800 |
| commit | 2cdd5908a910dc45eacbf79d5335806850e6984a (patch) | |
| tree | fa2ed056e93c2a64c92dd63fd1214c83153445b1 | |
| parent | d4a81d325b5ad7b4c85a57c3ec821182e7c0adfc (diff) | |
[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...
| -rw-r--r-- | fs/block_dev.c | 2 | ||||
| -rw-r--r-- | fs/partitions/check.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 36bbf0d97ffd..9fd5fc4c3a36 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -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; } diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 8d506c73e0f7..16d4de493448 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -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); |
