Re: [PATCH v7 5/6] udmabuf: Pin the pages using memfd_pin_folios() API (v5)

2023-12-13 Thread Matthew Wilcox
On Mon, Dec 11, 2023 at 11:38:02PM -0800, Vivek Kasireddy wrote: > +++ b/drivers/dma-buf/udmabuf.c > @@ -42,7 +42,7 @@ static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) > if (pgoff >= ubuf->pagecount) > return VM_FAULT_SIGBUS; > > - pfn =

[PATCH v7 5/6] udmabuf: Pin the pages using memfd_pin_folios() API (v5)

2023-12-12 Thread Vivek Kasireddy
Using memfd_pin_folios() will ensure that the pages are pinned correctly using FOLL_PIN. And, this also ensures that we don't accidentally break features such as memory hotunplug as it would not allow pinning pages in the movable zone. Using this new API also simplifies the code as we no longer