|
@@ -2115,6 +2115,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
|
|
} else {
|
|
} else {
|
|
const struct iovec *iov = i->iov;
|
|
const struct iovec *iov = i->iov;
|
|
size_t base = i->iov_offset;
|
|
size_t base = i->iov_offset;
|
|
|
|
+ unsigned long nr_segs = i->nr_segs;
|
|
|
|
|
|
/*
|
|
/*
|
|
* The !iov->iov_len check ensures we skip over unlikely
|
|
* The !iov->iov_len check ensures we skip over unlikely
|
|
@@ -2130,11 +2131,13 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
|
|
base += copy;
|
|
base += copy;
|
|
if (iov->iov_len == base) {
|
|
if (iov->iov_len == base) {
|
|
iov++;
|
|
iov++;
|
|
|
|
+ nr_segs--;
|
|
base = 0;
|
|
base = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
i->iov = iov;
|
|
i->iov = iov;
|
|
i->iov_offset = base;
|
|
i->iov_offset = base;
|
|
|
|
+ i->nr_segs = nr_segs;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(iov_iter_advance);
|
|
EXPORT_SYMBOL(iov_iter_advance);
|