Commit cf342570 authored by Nick Piggin's avatar Nick Piggin Committed by Jens Axboe

block: bd_start_claiming fix module refcount

bd_start_claiming has an unbalanced module_put introduced in 6b4517a7.
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 63a07cb6
......@@ -734,6 +734,7 @@ static struct block_device *bd_start_claiming(struct block_device *bdev,
return ERR_PTR(-ENXIO);
whole = bdget_disk(disk, 0);
module_put(disk->fops->owner);
put_disk(disk);
if (!whole)
return ERR_PTR(-ENOMEM);
......
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