[dm-devel] [PATCH] multipathd: remove unnecessary condition in check_path
Benjamin Marzinski
bmarzins at redhat.com
Tue Nov 1 17:42:01 UTC 2016
On Tue, Nov 01, 2016 at 04:14:31PM +0800, peng.liang5 at zte.com.cn wrote:
> 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.
ACK
-Ben
>
> 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