[PATCH RFC v1 07/12] staging: kpc2000: Prepare transfer_complete_cb() for PG_reserved changes
David Hildenbrand
david at redhat.com
Wed Oct 23 04:12:34 AEDT 2019
Right now, ZONE_DEVICE memory is always set PG_reserved. We want to
change that.
The pages are obtained via get_user_pages_fast(). I assume, these
could be ZONE_DEVICE pages. Let's just exclude them as well explicitly.
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Vandana BN <bnvandana at gmail.com>
Cc: "Simon Sandström" <simon at nikanor.nu>
Cc: Dan Carpenter <dan.carpenter at oracle.com>
Cc: Nishka Dasgupta <nishkadg.linux at gmail.com>
Cc: Madhumitha Prabakaran <madhumithabiw at gmail.com>
Cc: Fabio Estevam <festevam at gmail.com>
Cc: Matt Sickler <Matt.Sickler at daktronics.com>
Cc: Jeremy Sowden <jeremy at azazel.net>
Signed-off-by: David Hildenbrand <david at redhat.com>
---
drivers/staging/kpc2000/kpc_dma/fileops.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index cb52bd9a6d2f..457adcc81fe6 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -212,7 +212,8 @@ void transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags)
BUG_ON(acd->ldev->pldev == NULL);
for (i = 0 ; i < acd->page_count ; i++) {
- if (!PageReserved(acd->user_pages[i])) {
+ if (!PageReserved(acd->user_pages[i]) &&
+ !is_zone_device_page(acd->user_pages[i])) {
set_page_dirty(acd->user_pages[i]);
}
}
--
2.21.0
More information about the Linuxppc-dev
mailing list