From cf3425707ed9ce0d5ebaba20bc3d22dd39e52f2f Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Wed, 26 May 2010 01:50:21 +1000 Subject: [PATCH] block: bd_start_claiming fix module refcount bd_start_claiming has an unbalanced module_put introduced in 6b4517a79. Signed-off-by: Nick Piggin Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- fs/block_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7346c96308a5..204a7632c511 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -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);