From: David Hildenbrand Date: Wed, 16 Nov 2022 10:26:57 +0000 (+0100) Subject: RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage X-Git-Tag: v6.6.17~5931^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20ea7783236c374ddb7f201132a5fb9624563a77;p=platform%2Fkernel%2Flinux-rpi.git RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Link: https://lkml.kernel.org/r/20221116102659.70287-19-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc: Leon Romanovsky Signed-off-by: Andrew Morton --- diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c b/drivers/infiniband/hw/qib/qib_user_pages.c index f4b5f05..f693bc7 100644 --- a/drivers/infiniband/hw/qib/qib_user_pages.c +++ b/drivers/infiniband/hw/qib/qib_user_pages.c @@ -110,7 +110,7 @@ int qib_get_user_pages(unsigned long start_page, size_t num_pages, for (got = 0; got < num_pages; got += ret) { ret = pin_user_pages(start_page + got * PAGE_SIZE, num_pages - got, - FOLL_LONGTERM | FOLL_WRITE | FOLL_FORCE, + FOLL_LONGTERM | FOLL_WRITE, p + got, NULL); if (ret < 0) { mmap_read_unlock(current->mm);