[Devel] [PATCH rh7 2/2] ploop: Kill noop complete_merge method

Kirill Tkhai ktkhai at virtuozzo.com
Thu Oct 3 14:21:22 MSK 2019


It's unused after previous patch.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/dev.c        |    9 +--------
 drivers/block/ploop/fmt_ploop1.c |    7 -------
 include/linux/ploop/ploop.h      |    1 -
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index c65a99861548..7f13f40cfde1 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -3797,21 +3797,14 @@ static void ploop_merge_complete(struct ploop_device * plo,
 				 struct ploop_map * map,
 				 struct ploop_delta * delta, int err)
 {
-	struct ploop_delta *top_delta;
-
 	ploop_quiesce(plo);
 	mutex_lock(&plo->sysfs_mutex);
 	list_del(&delta->list);
 
 	if (err)
 		list_add(&delta->list, &plo->map.delta_list);
-	else {
-		top_delta = ploop_top_delta(plo);
-		if (top_delta->ops->complete_merge)
-			/* FIXME: How should we handle error here? */
-			top_delta->ops->complete_merge(top_delta);
+	else
 		ploop_update_fmt_version(plo);
-	}
 
 	plo->trans_map = NULL;
 	plo->maintenance_type = PLOOP_MNTN_OFF;
diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 4e81416f9cbe..981978c0ee4a 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -615,12 +615,6 @@ ploop1_start_merge(struct ploop_delta * delta, struct ploop_snapdata * sd)
 	return err;
 }
 
-static int
-ploop1_complete_merge(struct ploop_delta *delta)
-{
-	return 0;
-}
-
 static int
 ploop1_replace_delta(struct ploop_delta *delta)
 {
@@ -889,7 +883,6 @@ static struct ploop_delta_ops ploop1_delta_ops =
 	.complete_snapshot =	ploop1_complete_snapshot,
 	.fmt_prepare_merge =	ploop1_prepare_merge,
 	.start_merge	=	ploop1_start_merge,
-	.complete_merge =	ploop1_complete_merge,
 	.replace_delta 	=	ploop1_replace_delta,
 	.truncate	=	ploop1_truncate,
 	.prepare_grow	=	ploop1_prepare_grow,
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index ca10740efef4..ac427737fbeb 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -278,7 +278,6 @@ struct ploop_delta_ops
 	int		(*complete_snapshot)(struct ploop_delta *, struct ploop_snapdata *);
 	int		(*fmt_prepare_merge)(struct ploop_delta *, struct ploop_snapdata *);
 	int		(*start_merge)(struct ploop_delta *, struct ploop_snapdata *);
-	int		(*complete_merge)(struct ploop_delta *);
 	int		(*replace_delta)(struct ploop_delta *);
 	int		(*truncate)(struct ploop_delta *, struct file *, __u32 alloc_head);
 	int		(*prepare_grow)(struct ploop_delta *, u64 *new_size, int *reloc);



More information about the Devel mailing list