[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dm-devel
Subject:    [dm-devel] [PATCH] RFC: Changing dm core (4/5): remove dm_get_md()
From:       "Jun'ichi Nomura" <j-nomura () ce ! jp ! nec ! com>
Date:       2006-03-17 0:28:06
Message-ID: 441A0296.2070101 () ce ! jp ! nec ! com
[Download RAW message or body]

Remove dm_get_md(), which is no longer used.

Thanks,
-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.

["04-remove-dm-get-md.patch" (text/x-patch)]

Remove dm_get_md(), which is no longer used.

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>

 dm.c |   31 -------------------------------
 dm.h |    1 -
 2 files changed, 32 deletions(-)

--- linux-2.6.16-rc6-mm1-dm.03-hc-open-count/drivers/md/dm.c	2006-03-16 18:23:51.000000000 -0500
+++ linux-2.6.16-rc6-mm1-dm.04-remove-dm-get-md/drivers/md/dm.c	2006-03-16 18:15:58.000000000 -0500
@@ -938,37 +938,6 @@ int dm_create_with_minor(unsigned int mi
 	return create_aux(minor, 1, result);
 }
 
-static struct mapped_device *dm_find_md(dev_t dev)
-{
-	struct mapped_device *md;
-	unsigned minor = MINOR(dev);
-
-	if (MAJOR(dev) != _major || minor >= (1 << MINORBITS))
-		return NULL;
-
-	mutex_lock(&_minor_lock);
-
-	md = idr_find(&_minor_idr, minor);
-	if (!md || (dm_disk(md)->first_minor != minor))
-		md = NULL;
-
-	mutex_unlock(&_minor_lock);
-
-	return md;
-}
-
-struct mapped_device *dm_get_md(dev_t dev)
-{
-	struct mapped_device *md = dm_find_md(dev);
-
-	if (!md || !md->interface_ptr)
-		return NULL;
-
-	dm_get(md);
-
-	return md;
-}
-
 void *dm_get_mdptr(struct mapped_device *md)
 {
 	return md->interface_ptr;
--- linux-2.6.16-rc6-mm1-dm.03-hc-open-count/drivers/md/dm.h	2006-03-16 18:19:28.000000000 -0500
+++ linux-2.6.16-rc6-mm1-dm.04-remove-dm-get-md/drivers/md/dm.h	2006-03-16 18:19:35.000000000 -0500
@@ -48,7 +48,6 @@ int dm_create(struct mapped_device **md)
 int dm_create_with_minor(unsigned int minor, struct mapped_device **md);
 void dm_set_mdptr(struct mapped_device *md, void *ptr);
 void *dm_get_mdptr(struct mapped_device *md);
-struct mapped_device *dm_get_md(dev_t dev);
 
 /*
  * Reference counting for md.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic