mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
iov_iter: use "maxpages" parameter
This was intended to be "maxpages" instead of INT_MAX. There is only
one caller and it passes INT_MAX so this does not affect runtime.
Fixes: b93235e689 ("tls: cap the output scatter list to something reasonable")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3b63ef7baa
commit
7187440dd7
@@ -298,7 +298,7 @@ iov_iter_npages_cap(struct iov_iter *i, int maxpages, size_t max_bytes)
|
||||
shorted = iov_iter_count(i) - max_bytes;
|
||||
iov_iter_truncate(i, max_bytes);
|
||||
}
|
||||
npages = iov_iter_npages(i, INT_MAX);
|
||||
npages = iov_iter_npages(i, maxpages);
|
||||
if (shorted)
|
||||
iov_iter_reexpand(i, iov_iter_count(i) + shorted);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user