diff mbox

[5/6] rbd: kill rbd_dev_clear_mapping()

Message ID 51885B08.6080907@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder May 7, 2013, 1:38 a.m. UTC
This function is a duplicate of rbd_dev_mapping_clear(), and was
added by mistake.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

 	char *name;
@@ -4910,7 +4903,7 @@ static void rbd_dev_device_release(struct device *dev)

 	rbd_free_disk(rbd_dev);
 	clear_bit(RBD_DEV_FLAG_EXISTS, &rbd_dev->flags);
-	rbd_dev_clear_mapping(rbd_dev);
+	rbd_dev_mapping_clear(rbd_dev);
 	unregister_blkdev(rbd_dev->major, rbd_dev->name);
 	rbd_dev->major = 0;
 	rbd_dev_id_put(rbd_dev);

Comments

Josh Durgin May 7, 2013, 2:26 p.m. UTC | #1
Alex Elder <elder@inktank.com> wrote:

>This function is a duplicate of rbd_dev_mapping_clear(), and was
>added by mistake.
>
>Signed-off-by: Alex Elder <elder@inktank.com>
>---
> drivers/block/rbd.c |    9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
>diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
>index 5eebf6d..530793a 100644
>--- a/drivers/block/rbd.c
>+++ b/drivers/block/rbd.c
>@@ -966,13 +966,6 @@ static void rbd_dev_mapping_clear(struct
>rbd_device
>*rbd_dev)
> 	rbd_dev->mapping.read_only = true;
> }
>
>-static void rbd_dev_clear_mapping(struct rbd_device *rbd_dev)
>-{
>-	rbd_dev->mapping.size = 0;
>-	rbd_dev->mapping.features = 0;
>-	rbd_dev->mapping.read_only = true;
>-}
>-
>static const char *rbd_segment_name(struct rbd_device *rbd_dev, u64
>offset)
> {
> 	char *name;
>@@ -4910,7 +4903,7 @@ static void rbd_dev_device_release(struct device
>*dev)
>
> 	rbd_free_disk(rbd_dev);
> 	clear_bit(RBD_DEV_FLAG_EXISTS, &rbd_dev->flags);
>-	rbd_dev_clear_mapping(rbd_dev);
>+	rbd_dev_mapping_clear(rbd_dev);
> 	unregister_blkdev(rbd_dev->major, rbd_dev->name);
> 	rbd_dev->major = 0;
> 	rbd_dev_id_put(rbd_dev);

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 5eebf6d..530793a 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -966,13 +966,6 @@  static void rbd_dev_mapping_clear(struct rbd_device
*rbd_dev)
 	rbd_dev->mapping.read_only = true;
 }

-static void rbd_dev_clear_mapping(struct rbd_device *rbd_dev)
-{
-	rbd_dev->mapping.size = 0;
-	rbd_dev->mapping.features = 0;
-	rbd_dev->mapping.read_only = true;
-}
-
 static const char *rbd_segment_name(struct rbd_device *rbd_dev, u64 offset)
 {