diff options
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index d68798061795..4a17743a639f 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c | |||
@@ -310,13 +310,15 @@ static unsigned int iser_data_buf_aligned_len(struct iser_data_buf *data, | |||
310 | if (i + 1 < data->dma_nents) { | 310 | if (i + 1 < data->dma_nents) { |
311 | next_addr = ib_sg_dma_address(ibdev, sg_next(sg)); | 311 | next_addr = ib_sg_dma_address(ibdev, sg_next(sg)); |
312 | /* are i, i+1 fragments of the same page? */ | 312 | /* are i, i+1 fragments of the same page? */ |
313 | if (end_addr == next_addr) | 313 | if (end_addr == next_addr) { |
314 | cnt++; | ||
314 | continue; | 315 | continue; |
315 | else if (!IS_4K_ALIGNED(end_addr)) { | 316 | } else if (!IS_4K_ALIGNED(end_addr)) { |
316 | ret_len = cnt + 1; | 317 | ret_len = cnt + 1; |
317 | break; | 318 | break; |
318 | } | 319 | } |
319 | } | 320 | } |
321 | cnt++; | ||
320 | } | 322 | } |
321 | if (i == data->dma_nents) | 323 | if (i == data->dma_nents) |
322 | ret_len = cnt; /* loop ended */ | 324 | ret_len = cnt; /* loop ended */ |