]> git.baikalelectronics.ru Git - kernel.git/commit
iov_iter: saner helper for page array allocation
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 17 Jun 2022 18:45:41 +0000 (14:45 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 9 Aug 2022 02:37:22 +0000 (22:37 -0400)
commit387d7dbf4a5427f50f6ac390ca1b76fb473a6b53
tree11087a554496e94eafb4c180c5dad398ca30ac79
parent9fd40aecbd83ac8e3df5df73c13a230294fb9978
iov_iter: saner helper for page array allocation

All call sites of get_pages_array() are essenitally identical now.
Replace with common helper...

Returns number of slots available in resulting array or 0 on OOM;
it's up to the caller to make sure it doesn't ask to zero-entry
array (i.e. neither maxpages nor size are allowed to be zero).

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c