The patch titled sg: nopage has been added to the -mm tree. Its filename is sg-nopage.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: sg: nopage From: Nick Piggin <npiggin@xxxxxxx> Convert SG from nopage to fault. Signed-off-by: Nick Piggin <npiggin@xxxxxxx> Cc: Douglas Gilbert <dougg@xxxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/sg.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff -puN drivers/scsi/sg.c~sg-nopage drivers/scsi/sg.c --- a/drivers/scsi/sg.c~sg-nopage +++ a/drivers/scsi/sg.c @@ -1144,23 +1144,22 @@ sg_fasync(int fd, struct file *filp, int return (retval < 0) ? retval : 0; } -static struct page * -sg_vma_nopage(struct vm_area_struct *vma, unsigned long addr, int *type) +static int +sg_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { Sg_fd *sfp; - struct page *page = NOPAGE_SIGBUS; unsigned long offset, len, sa; Sg_scatter_hold *rsv_schp; struct scatterlist *sg; int k; if ((NULL == vma) || (!(sfp = (Sg_fd *) vma->vm_private_data))) - return page; + return VM_FAULT_SIGBUS; rsv_schp = &sfp->reserve; - offset = addr - vma->vm_start; + offset = vmf->pgoff << PAGE_SHIFT; if (offset >= rsv_schp->bufflen) - return page; - SCSI_LOG_TIMEOUT(3, printk("sg_vma_nopage: offset=%lu, scatg=%d\n", + return VM_FAULT_SIGBUS; + SCSI_LOG_TIMEOUT(3, printk("sg_vma_fault: offset=%lu, scatg=%d\n", offset, rsv_schp->k_use_sg)); sg = rsv_schp->buffer; sa = vma->vm_start; @@ -1169,21 +1168,21 @@ sg_vma_nopage(struct vm_area_struct *vma len = vma->vm_end - sa; len = (len < sg->length) ? len : sg->length; if (offset < len) { + struct page *page; page = virt_to_page(page_address(sg_page(sg)) + offset); get_page(page); /* increment page count */ - break; + vmf->page = page; + return 0; /* success */ } sa += len; offset -= len; } - if (type) - *type = VM_FAULT_MINOR; - return page; + return VM_FAULT_SIGBUS; } static struct vm_operations_struct sg_mmap_vm_ops = { - .nopage = sg_vma_nopage, + .fault = sg_vma_fault, }; static int _ Patches currently in -mm which might be from npiggin@xxxxxxx are mm-fix-xip-file-writes.patch git-jfs.patch nfs-use-gfp_nofs-preloads-for-radix-tree-insertion.patch slub-use-non-atomic-bit-unlock.patch radix-tree-avoid-atomic-allocations-for-preloaded-insertions.patch mm-dont-allow-ioremapping-of-ranges-larger-than-vmalloc-space.patch vt-bitlock-fix.patch radix_treeh-trivial-comment-correction.patch inotify-fix-race.patch inotify-remove-debug-code.patch rewrite-rd.patch rewrite-rd-fix.patch rd-support-xip.patch reiser4.patch ia64-ia32-nopage.patch relay-nopage.patch uio-nopage.patch ieee1394-nopage.patch v4l-nopage.patch fb-defio-nopage.patch agp-alpha-nopage.patch sg-nopage.patch ib-nopage.patch usb-mon-nopage.patch alsa-nopage.patch alsa-usx2y-nopage.patch mm-special-mapping-nopage.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html