diff options
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 7c8671b06fe3..dd8bd2e867cd 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -357,7 +357,7 @@ static int open_dev(struct dm_dev_internal *d, dev_t dev, | |||
357 | return PTR_ERR(bdev); | 357 | return PTR_ERR(bdev); |
358 | r = bd_claim_by_disk(bdev, _claim_ptr, dm_disk(md)); | 358 | r = bd_claim_by_disk(bdev, _claim_ptr, dm_disk(md)); |
359 | if (r) | 359 | if (r) |
360 | blkdev_put(bdev); | 360 | blkdev_put(bdev, d->dm_dev.mode); |
361 | else | 361 | else |
362 | d->dm_dev.bdev = bdev; | 362 | d->dm_dev.bdev = bdev; |
363 | return r; | 363 | return r; |
@@ -372,7 +372,7 @@ static void close_dev(struct dm_dev_internal *d, struct mapped_device *md) | |||
372 | return; | 372 | return; |
373 | 373 | ||
374 | bd_release_from_disk(d->dm_dev.bdev, dm_disk(md)); | 374 | bd_release_from_disk(d->dm_dev.bdev, dm_disk(md)); |
375 | blkdev_put(d->dm_dev.bdev); | 375 | blkdev_put(d->dm_dev.bdev, d->dm_dev.mode); |
376 | d->dm_dev.bdev = NULL; | 376 | d->dm_dev.bdev = NULL; |
377 | } | 377 | } |
378 | 378 | ||