From patchwork Mon Mar 16 12:36:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6018111 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CC94BF90F for ; Mon, 16 Mar 2015 12:44:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD855204D9 for ; Mon, 16 Mar 2015 12:44:19 +0000 (UTC) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D6777204C9 for ; Mon, 16 Mar 2015 12:44:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2GCcLb7054637; Mon, 16 Mar 2015 08:38:21 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t2GCbIRe028861 for ; Mon, 16 Mar 2015 08:37:18 -0400 Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2GCbHTl004245; Mon, 16 Mar 2015 08:37:17 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2GCbFeL011632 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=FAIL); Mon, 16 Mar 2015 08:37:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AB309ADE2; Mon, 16 Mar 2015 12:37:09 +0000 (UTC) From: Hannes Reinecke To: Christophe Varoqui Date: Mon, 16 Mar 2015 13:36:29 +0100 Message-Id: <1426509425-15978-43-git-send-email-hare@suse.de> In-Reply-To: <1426509425-15978-1-git-send-email-hare@suse.de> References: <1426509425-15978-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.309 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, URIBL_BLOCKED) 195.135.220.15 cantor2.suse.de 195.135.220.15 cantor2.suse.de X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.20 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 42/78] Remove last argument from verify_paths() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Argument is always NULL, so remove it. Signed-off-by: Hannes Reinecke --- libmultipath/configure.c | 2 +- libmultipath/structs_vec.c | 14 +++++--------- libmultipath/structs_vec.h | 2 +- multipathd/main.c | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index a30ca59..2465563 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -820,7 +820,7 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r if (pp2->priority == PRIO_UNDEF) mpp->action = ACT_REJECT; } - verify_paths(mpp, vecs, NULL); + verify_paths(mpp, vecs); params[0] = '\0'; if (setup_map(mpp, params, PARAMS_SIZE)) { diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index 6be8c51..6d2d45e 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -489,7 +489,7 @@ out: } extern int -verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec) +verify_paths(struct multipath * mpp, struct vectors * vecs) { struct path * pp; int count = 0; @@ -515,14 +515,10 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec) vector_del_slot(mpp->paths, i); i--; - if (rpvec) - store_path(rpvec, pp); - else { - if ((j = find_slot(vecs->pathvec, - (void *)pp)) != -1) - vector_del_slot(vecs->pathvec, j); - free_path(pp); - } + if ((j = find_slot(vecs->pathvec, + (void *)pp)) != -1) + vector_del_slot(vecs->pathvec, j); + free_path(pp); } else { condlog(4, "%s: verified path %s dev_t %s", mpp->alias, pp->dev, pp->dev_t); diff --git a/libmultipath/structs_vec.h b/libmultipath/structs_vec.h index c6278ac..eb8e672 100644 --- a/libmultipath/structs_vec.h +++ b/libmultipath/structs_vec.h @@ -19,7 +19,7 @@ int adopt_paths (vector pathvec, struct multipath * mpp, int get_info); void orphan_paths (vector pathvec, struct multipath * mpp); void orphan_path (struct path * pp, const char *reason); -int verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec); +int verify_paths(struct multipath * mpp, struct vectors * vecs); int update_mpp_paths(struct multipath * mpp, vector pathvec); int __setup_multipath (struct vectors * vecs, struct multipath * mpp, int reset); diff --git a/multipathd/main.c b/multipathd/main.c index 6a3fd5e..ffe4326 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -495,7 +495,7 @@ rescan: if (adopt_paths(vecs->pathvec, mpp, 1)) goto fail; /* leave path added to pathvec */ - verify_paths(mpp, vecs, NULL); + verify_paths(mpp, vecs); mpp->flush_on_last_del = FLUSH_UNDEF; mpp->action = ACT_RELOAD; } else {