Whamcloud - gitweb
b=6000
authorgreen <green>
Fri, 1 Apr 2005 15:00:52 +0000 (15:00 +0000)
committergreen <green>
Fri, 1 Apr 2005 15:00:52 +0000 (15:00 +0000)
Do not search any VMAs in NULL mm. Fixes NFS exporting problems for HP.

lustre/llite/llite_mmap.c

index 41438d6..e4d6670 100644 (file)
@@ -283,6 +283,10 @@ static struct vm_area_struct * our_vma(unsigned long addr, size_t count)
         struct vm_area_struct *vma, *ret = NULL;
         ENTRY;
 
+        /* No MM (e.g. NFS)? No vmas too. */
+        if (!mm)
+                RETURN(NULL);
+
         spin_lock(&mm->page_table_lock);
         for(vma = find_vma(mm, addr);
             vma != NULL && vma->vm_start < (addr + count); vma = vma->vm_next) {