block: bd_start_claiming fix module refcount
bd_start_claiming has an unbalanced module_put introduced in 6b4517a79
.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
parent
63a07cb64c
commit
cf3425707e
1 changed files with 1 additions and 0 deletions
|
@ -734,6 +734,7 @@ static struct block_device *bd_start_claiming(struct block_device *bdev,
|
||||||
return ERR_PTR(-ENXIO);
|
return ERR_PTR(-ENXIO);
|
||||||
|
|
||||||
whole = bdget_disk(disk, 0);
|
whole = bdget_disk(disk, 0);
|
||||||
|
module_put(disk->fops->owner);
|
||||||
put_disk(disk);
|
put_disk(disk);
|
||||||
if (!whole)
|
if (!whole)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
Loading…
Reference in a new issue