[RHEL7,COMMIT] ploop: Kill noop complete_merge method

Submitted by Konstantin Khorenko on Oct. 3, 2019, 3:57 p.m.

Details

Message ID 201910031556.x93Fuw5R011522@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Oct. 3, 2019, 3:57 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.27.2.vz7.107.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.27.2.vz7.107.13
------>
commit 215ee626e803d5f0b0b9a8c780a21e1295da6780
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Thu Oct 3 18:56:58 2019 +0300

    ploop: Kill noop complete_merge method
    
    It's unused after previous patch.
    
    Signed-off-by: Kirill Tkhai <ktkhai@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(-)

Patch hide | download patch | download mbox

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);