diff options
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
-rw-r--r-- | drivers/md/dm-thin-metadata.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 82b82c318f14..afd84cacca4b 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -681,10 +681,11 @@ struct dm_pool_metadata *dm_pool_metadata_open(struct block_device *bdev, bm = dm_block_manager_create(bdev, THIN_METADATA_BLOCK_SIZE, THIN_METADATA_CACHE_SIZE, THIN_MAX_CONCURRENT_LOCKS); - if (!bm) { + if (IS_ERR(bm)) { + r = PTR_ERR(bm); DMERR("could not create block manager"); kfree(pmd); - return ERR_PTR(-ENOMEM); + return ERR_PTR(r); } r = superblock_all_zeroes(bm, &create); @@ -694,7 +695,6 @@ struct dm_pool_metadata *dm_pool_metadata_open(struct block_device *bdev, return ERR_PTR(r); } - r = init_pmd(pmd, bm, 0, create); if (r) { dm_block_manager_destroy(bm); |