[dm-devel] [PATCH] multipathd: remove unnecessary condition in check_path

peng.liang5 at zte.com.cn peng.liang5 at zte.com.cn
Tue Nov 1 08:14:31 UTC 2016


From: PengLiang <peng.liang5 at 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 at 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




More information about the dm-devel mailing list