mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user