Skip to content

Commit

Permalink
SQUASH
Browse files Browse the repository at this point in the history
Ughhhh... Doing some cleanup.

Signed-off-by: Brian Atkinson <[email protected]>
  • Loading branch information
bwatkinson committed Dec 10, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
1 parent fa255a7 commit 7ca6ceb
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/kernel-pin-user-pages.m4
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PIN_USER_PAGES], [
],[
unsigned long start = 0;
unsigned long nr_pages = 1;
strauct page **pages = NULL;
struct page **pages = NULL;
unsigned int gup_flags = 0;
long ret __attribute__ ((unused));
12 changes: 6 additions & 6 deletions module/os/linux/zfs/zfs_uio.c
Original file line number Diff line number Diff line change
@@ -441,6 +441,7 @@ zfs_unmark_page(struct page *page)
}
#endif /* HAVE_ZERO_PAGE_GPL_ONLY || !_LP64 */

#if !defined(HAVE_PIN_USER_PAGES_UNLOCKED)
static void
zfs_uio_dio_check_for_zero_page(zfs_uio_t *uio)
{
@@ -472,6 +473,7 @@ zfs_uio_dio_check_for_zero_page(zfs_uio_t *uio)
}
}
}
#endif

void
zfs_uio_free_dio_pages(zfs_uio_t *uio, zfs_uio_rw_t rw)
@@ -506,8 +508,7 @@ zfs_uio_pin_user_pages(zfs_uio_t *uio, zfs_uio_rw_t rw)
long res;
size_t skip = uio->uio_skip;
size_t len = uio->uio_resid - skip;
unsigned ing gup_flags = 0;
size_t amt;
unsigned int gup_flags = 0;
unsigned long addr;
unsigned long nr_pages;

@@ -530,7 +531,7 @@ zfs_uio_pin_user_pages(zfs_uio_t *uio, zfs_uio_rw_t rw)
return (0);
}
#endif
const struct iovec *iovp = zfs_uio_uio_iter_iov(uio->iov_iter);
const struct iovec *iovp = zfs_uio_iter_iov(uio->uio_iter);
for (int i = 0; i < uio->uio_iovcnt; i++) {
size_t amt = iovp->iov_len - skip;
if (amt == 0) {
@@ -539,7 +540,7 @@ zfs_uio_pin_user_pages(zfs_uio_t *uio, zfs_uio_rw_t rw)
continue;
}

addr = ivop->iov_base + skip;
addr = (unsigned long)iovp->iov_base + skip;
nr_pages = DIV_ROUND_UP(amt, PAGE_SIZE);
res = pin_user_pages_unlocked(addr, nr_pages,
&uio->uio_dio.pages[uio->uio_dio.npages], gup_flags);
@@ -631,9 +632,8 @@ zfs_uio_get_dio_pages_alloc(zfs_uio_t *uio, zfs_uio_rw_t rw)
}

#if !defined(HAVE_PIN_USER_PAGES_UNLOCKED)
if (rw == UIO_WRITE) {
if (rw == UIO_WRITE)
zfs_uio_dio_check_for_zero_page(uio);
}
#endif

uio->uio_extflg |= UIO_DIRECT;

0 comments on commit 7ca6ceb

Please sign in to comment.