Merge remote-tracking branch 'char-misc/char-misc-next'
[deliverable/linux.git] / drivers / misc / mic / scif / scif_mmap.c
index 49cb8f7b46727b302f5a74aae79eac0ebfcedca4..92821167707927891bca4d336d8d9133e8c47c1d 100644 (file)
@@ -552,7 +552,7 @@ static void scif_munmap(struct vm_area_struct *vma)
 {
        struct scif_endpt *ep;
        struct vma_pvt *vmapvt = vma->vm_private_data;
-       int nr_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+       int nr_pages = vma_pages(vma);
        s64 offset;
        struct scif_rma_req req;
        struct scif_window *window = NULL;
@@ -614,7 +614,7 @@ int scif_mmap(struct vm_area_struct *vma, scif_epd_t epd)
        struct scif_window *window = NULL;
        struct scif_endpt *ep = (struct scif_endpt *)epd;
        s64 start_offset = vma->vm_pgoff << PAGE_SHIFT;
-       int nr_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+       int nr_pages = vma_pages(vma);
        int err;
        struct vma_pvt *vmapvt;
 
This page took 0.024535 seconds and 5 git commands to generate.