All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipathd: remove unnecessary condition in check_path
@ 2016-11-01  8:14 peng.liang5
  2016-11-01 17:42 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: peng.liang5 @ 2016-11-01  8:14 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: zhang.kai16, PengLiang, dm-devel

From: PengLiang <peng.liang5@zte.com.cn>

The pp->mpp is an unnecessary condition. It will be return before this condition
if pp->mpp is NULL.

Signed-off-by: PengLiang <peng.liang5@zte.com.cn>
---
 multipathd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 03c2dd9..6a80ebe 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1566,7 +1566,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
 
 	if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
 	     pp->wait_checks > 0) {
-		if (pp->mpp && pp->mpp->nr_active > 0) {
+		if (pp->mpp->nr_active > 0) {
 			pp->state = PATH_DELAYED;
 			pp->wait_checks--;
 			return 1;
-- 
2.8.1.windows.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] multipathd: remove unnecessary condition in check_path
  2016-11-01  8:14 [PATCH] multipathd: remove unnecessary condition in check_path peng.liang5
@ 2016-11-01 17:42 ` Benjamin Marzinski
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Marzinski @ 2016-11-01 17:42 UTC (permalink / raw)
  To: peng.liang5; +Cc: dm-devel, zhang.kai16

On Tue, Nov 01, 2016 at 04:14:31PM +0800, peng.liang5@zte.com.cn wrote:
> From: PengLiang <peng.liang5@zte.com.cn>
> 
> The pp->mpp is an unnecessary condition. It will be return before this condition
> if pp->mpp is NULL.

ACK

-Ben

> 
> Signed-off-by: PengLiang <peng.liang5@zte.com.cn>
> ---
>  multipathd/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index 03c2dd9..6a80ebe 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -1566,7 +1566,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
>  
>  	if ((newstate == PATH_UP || newstate == PATH_GHOST) &&
>  	     pp->wait_checks > 0) {
> -		if (pp->mpp && pp->mpp->nr_active > 0) {
> +		if (pp->mpp->nr_active > 0) {
>  			pp->state = PATH_DELAYED;
>  			pp->wait_checks--;
>  			return 1;
> -- 
> 2.8.1.windows.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-01 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01  8:14 [PATCH] multipathd: remove unnecessary condition in check_path peng.liang5
2016-11-01 17:42 ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.