Skip to content

Commit

Permalink
block: bd_start_claiming fix module refcount
Browse files Browse the repository at this point in the history
bd_start_claiming has an unbalanced module_put introduced in 6b4517a.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Nick Piggin authored and Jens Axboe committed Jun 10, 2010
1 parent 63a07cb commit cf34257
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cf34257

Please sign in to comment.