[Devel] [PATCH RH8 30/61] ploop: Convert ploop_init_end_io()

Kirill Tkhai ktkhai at virtuozzo.com
Fri May 14 18:57:17 MSK 2021


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index a61de5f934c0..b62eb055160d 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -82,7 +82,7 @@ static void ploop_index_wb_init(struct ploop_index_wb *piwb, struct ploop *ploop
 	piwb->type = PIWB_TYPE_ALLOC;
 }
 
-static void __ploop_init_end_io(struct ploop *ploop, struct pio *pio)
+static void ploop_init_end_io(struct ploop *ploop, struct pio *pio)
 {
 	pio->action = PLOOP_END_IO_NONE;
 	pio->ref_index = PLOOP_REF_INDEX_INVALID;
@@ -95,13 +95,6 @@ static void __ploop_init_end_io(struct ploop *ploop, struct pio *pio)
 	RB_CLEAR_NODE(&pio->node);
 }
 
-static void ploop_init_end_io(struct ploop *ploop, struct bio *bio)
-{
-	struct pio *pio = bio_to_endio_hook(bio);
-
-	__ploop_init_end_io(ploop, pio);
-}
-
 /* Get cluster related to pio sectors */
 static int ploop_pio_cluster(struct ploop *ploop, struct pio *pio,
 			     unsigned int *ret_cluster)
@@ -1077,7 +1070,7 @@ int submit_cluster_cow(struct ploop *ploop, unsigned int level,
 	bio->bi_end_io = ploop_cow_endio;
 	bio->bi_private = cow;
 
-	__ploop_init_end_io(ploop, &cow->hook);
+	ploop_init_end_io(ploop, &cow->hook);
 	add_cluster_lk(ploop, &cow->hook, cluster);
 
 	/* Stage #0: read secondary delta full cluster */
@@ -1636,7 +1629,7 @@ int ploop_map(struct dm_target *ti, struct bio *bio)
 	unsigned int cluster;
 	unsigned long flags;
 
-	ploop_init_end_io(ploop, bio);
+	ploop_init_end_io(ploop, pio);
 
 	remap_to_origin(ploop, bio);
 




More information about the Devel mailing list