On Sat, 2006-08-19 at 00:11 -0400, Douglas Gilbert wrote: > @@ -1164,7 +1164,7 @@ > len = vma->vm_end - sa; > len = (len < sg->length) ? len : sg->length; > if (offset < len) { > - page = sg->page; > + page = virt_to_page(page_address(sg->page) + offset); > get_page(page); /* increment page count */ > break; > } Doing something like this always frightens people in linux because page_address() on highmem returns NULL. I know, having looked, that in this case it can't happen, but since sg->page is really an array of pages, how about something simpler like page = &sg->page[offset >> PAGE_SHIFT] or (if you want to be more correct) something like the nth_page macro in linux/mm.h? It might also be worthwhile considering GFP_HIGHUSER for this allocation (in spite of all the kmap_atomic et al that would have to be added to the code), since that will increase the chance of a contiguous allocation on large memory machines. James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html