diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 9aa3d9e91c5d1f8716bb6fdd7320e113577a23fe..8db98187a51aa53fa139750195f7334dd34daaa0 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -201,7 +201,7 @@ static inline size_t nvme_tcp_req_cur_offset(struct nvme_tcp_request *req) 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); }