Re: [PATCH 5/5] staging/rdma/hfi1: Add page lock limit check for SDMA requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 02, 2015 at 03:56:27PM -0500, ira.weiny@xxxxxxxxx wrote:
> -		for (i = tx->idx; i >= 0; i--) {
> -			if (tx->iovecs[i].flags & TXREQ_FLAGS_IOVEC_LAST_PKT)
> -				unpin_vector_pages(tx->iovecs[i].vec);
> +	/*
> +	 * If we have any io vectors associated with this txreq,
> +	 * check whether they need to be 'freed'. We can't free them
> +	 * here because the unpin function needs to be able to sleep.
> +	 */
> +	i = tx->idx;
> +	while (i)
> +		if (tx->iovecs[i--].flags & TXREQ_FLAGS_IOVEC_LAST_PKT) {
> +			defer = true;
> +			break;
>  		}


In the original code, we checked tx->iovecs[0].flags but now we skip
that one.  Going back to the original for loop is probably the right way
to fix this.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux