Skip to content

Commit

Permalink
SQUASH
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Atkinson <[email protected]>
  • Loading branch information
bwatkinson committed Jan 29, 2025
1 parent d593704 commit 613bc1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions module/os/linux/zfs/zfs_uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,9 @@ zfs_uio_free_dio_pages(zfs_uio_t *uio, zfs_uio_rw_t rw)
ASSERT3P(uio->uio_dio.pages, !=, NULL);

#if defined(HAVE_PIN_USER_PAGES_UNLOCKED)
if (uio->uio_dio.pinned) {
if (uio->uio_dio.pinned)
unpin_user_pages(uio->uio_dio.pages, uio->uio_dio.npages);
vmem_free(uio->uio_dio.pages,
uio->uio_dio.npages * sizeof (struct page *));
return;
}
else
#endif
for (long i = 0; i < uio->uio_dio.npages; i++) {
struct page *p = uio->uio_dio.pages[i];
Expand Down Expand Up @@ -649,13 +646,16 @@ zfs_uio_get_dio_pages_alloc(zfs_uio_t *uio, zfs_uio_rw_t rw)

if (error) {
#if defined(HAVE_PIN_USER_PAGES_UNLOCKED)
if (uio->uio_dio.pinned)
if (uio->uio_dio.pinned) {
unpin_user_pages(uio->uio_dio.pages,
uio->uio_dio.npages);
else
} else {
#endif
for (long i = 0; i < uio->uio_dio.npages; i++)
put_page(uio->uio_dio.pages[i]);
#if defined(HAVE_PIN_USER_PAGES_UNLOCKED)
}
#endif
for (long i = 0; i < uio->uio_dio.npages; i++)
put_page(uio->uio_dio.pages[i]);

vmem_free(uio->uio_dio.pages, size);
return (error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function cleanup

log_assert "Verify loopback devices with Direct I/O."

if is_freebsd; then
if ! is_linux; then
log_unsupported "This is just a check for Linux Direct I/O"
fi

Expand Down

0 comments on commit 613bc1a

Please sign in to comment.