-int dm_open_count(struct mapped_device *md)
-{
- return atomic_read(&md->open_count);
-}
-
-/*
- * Guarantees nothing is using the device before it's deleted.
- */
-int dm_lock_for_deletion(struct mapped_device *md)
-{
- int r = 0;
-
- spin_lock(&_minor_lock);
-
- if (dm_open_count(md))
- r = -EBUSY;
- else
- set_bit(DMF_DELETING, &md->flags);
-
- spin_unlock(&_minor_lock);
-
- return r;
-}
-
-static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
-{
- struct mapped_device *md = bdev->bd_disk->private_data;
-
- return dm_get_geometry(md, geo);
-}
-