--- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -186,7 +186,7 @@ static inline size_t nvme_tcp_req_cur_of static inline size_t nvme_tcp_req_cur_length(struct nvme_tcp_request *req) { - return min_t(size_t, req->iter.bvec->bv_len - req->iter.iov_offset, + return min_t(size_t, iov_iter_single_seg_count(&req->iter), req->pdu_len - req->pdu_sent); }