Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254006
b: refs/heads/master
c: d4c208b
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Jun 13, 2011
1 parent 3f5aa5e commit 93677f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08e8138adebdd511e0955e8d6c051904bb4082af
refs/heads/master: d4c208b86b8be4254eba0e74071496e599f94639
14 changes: 13 additions & 1 deletion trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,19 @@ static struct block_device *bd_start_claiming(struct block_device *bdev,
if (!disk)
return ERR_PTR(-ENXIO);

whole = bdget_disk(disk, 0);
/*
* Normally, @bdev should equal what's returned from bdget_disk()
* if partno is 0; however, some drivers (floppy) use multiple
* bdev's for the same physical device and @bdev may be one of the
* aliases. Keep @bdev if partno is 0. This means claimer
* tracking is broken for those devices but it has always been that
* way.
*/
if (partno)
whole = bdget_disk(disk, 0);
else
whole = bdgrab(bdev);

module_put(disk->fops->owner);
put_disk(disk);
if (!whole)
Expand Down

0 comments on commit 93677f0

Please sign in to comment.