mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
config: remove HAVE_GET_USER_PAGES_*
get_user_pages_unlocked() had stabilised by 4.9. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
committed by
Brian Behlendorf
parent
696d7a71a0
commit
5df65ca9c1
@@ -589,9 +589,16 @@ zfs_uio_iov_step(struct iovec v, zfs_uio_rw_t rw, zfs_uio_t *uio,
|
||||
size_t len = v.iov_len;
|
||||
unsigned long n = DIV_ROUND_UP(len, PAGE_SIZE);
|
||||
|
||||
long res = zfs_get_user_pages(
|
||||
P2ALIGN_TYPED(addr, PAGE_SIZE, unsigned long), n, rw == UIO_READ,
|
||||
&uio->uio_dio.pages[uio->uio_dio.npages]);
|
||||
/*
|
||||
* read returning FOLL_WRITE is due to the fact that we are stating
|
||||
* that the kernel will have write access to the user pages. So, when a
|
||||
* Direct I/O read request is issued, the kernel must write to the user
|
||||
* pages.
|
||||
*/
|
||||
long res = get_user_pages_unlocked(
|
||||
P2ALIGN_TYPED(addr, PAGE_SIZE, unsigned long), n,
|
||||
&uio->uio_dio.pages[uio->uio_dio.npages],
|
||||
rw == UIO_READ ? FOLL_WRITE : 0);
|
||||
if (res < 0) {
|
||||
return (SET_ERROR(-res));
|
||||
} else if (len != (res * PAGE_SIZE)) {
|
||||
|
||||
Reference in New Issue
Block a user