Scott,

> diff -pru ../lustre-old/lnet/klnds/mxlnd/mxlnd_cb.c ./lnet/klnds/ 
> mxlnd/mxlnd_cb.c
> --- ../lustre-old/lnet/klnds/mxlnd/mxlnd_cb.c   2007-02-09  
> 19:04:46.000000000 -0500
> +++ ./lnet/klnds/mxlnd/mxlnd_cb.c       2007-04-13 15:16:29.000000000  
> -0400
> @@ -1087,6 +1087,7 @@ int
> mxlnd_get_peer_info(int index, lnet_nid_t *nidp, int *count)
> {
>           int                      i      = 0;
> +        int                      ret    = -ENOENT;
>           struct kmx_peer         *peer   = NULL;
>           struct kmx_conn         *conn   = NULL;
> @@ -1099,11 +1100,12 @@ mxlnd_get_peer_info(int index, lnet_nid_
>                           *nidp = peer->mxp_nid;
>                           *count = atomic_read(&peer->mxp_refcount);
> +                        ret = 0;
+                       break;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
need exit from loop.

>                   }
>           }
>           read_unlock(&kmxlnd_data.kmx_peers_lock);
> 
> -        return -ENOENT;
> +        return ret;
> }
> void
I think not need others loops after found data.

-- 
Alexey Lyashkov <[EMAIL PROTECTED]>
Beaver team

_______________________________________________
Lustre-devel mailing list
[EMAIL PROTECTED]
https://mail.clusterfs.com/mailman/listinfo/lustre-devel

Reply via email to