Krishna Kumar wrote:
>       mutex_lock(&lock);
>       list_for_each_entry_safe(req, temp_req, &req_list, list) {
> -             if (req->status) {
> +             if (req->status && req->status != -ECANCELED) {

I think we just need:

                if (req->status == -ENODATA) {

>                       src_in = (struct sockaddr_in *) &req->src_addr;
>                       dst_in = (struct sockaddr_in *) &req->dst_addr;
>                       req->status = addr_resolve_remote(src_in, dst_in,
>                                                         req->addr);
> +                     if (req->status && time_after_eq(jiffies, req->timeout))
> +                             req->status = -ETIMEDOUT;
> +                     else if (req->status == -ENODATA)
> +                             continue;
>               }
> -             if (req->status && time_after(jiffies, req->timeout))
> -                     req->status = -ETIMEDOUT;
> -             else if (req->status == -ENODATA)
> -                     continue;
> -

The other changes look fine.  But note that if req->status == -ECANCELED and 
time_after() is true, then it seems like a toss up as to which one can be 
reported to the user.

- Sean

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to