Re: [PATCH v2 15/26] IB/srp: Split srp_map_sg

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

 



On 9/25/2015 7:15 PM, Bart Van Assche wrote:
On 09/24/2015 10:35 AM, Sagi Grimberg wrote:
This is a perparation patch for the new registration API
             ^ preparation ?

Fixed, thanks.

+    WARN_ON_ONCE(!dev->use_fmr);
+
+    if (state->npages == 0)
+        return 0;
+
+    if (state->npages == 1 && target->global_mr) {
+        srp_map_desc(state, state->base_dma_addr, state->dma_len,
+                 target->global_mr->rkey);
+        return 0;
+    }
+

The above is not correct. The npages and dma_len variables have to be
reset before returning. How about changing the "return 0" statement into
"goto reset_state" and adding a "reset_state" label ?

Done, thanks.
--
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