tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
[pandora-kernel.git] / mm / nommu.c
index f0cd7ab..1fcf634 100644 (file)
@@ -1283,10 +1283,8 @@ unsigned long do_mmap_pgoff(struct file *file,
        vma->vm_pgoff = pgoff;
 
        if (file) {
-               region->vm_file = file;
-               get_file(file);
-               vma->vm_file = file;
-               get_file(file);
+               region->vm_file = get_file(file);
+               vma->vm_file = get_file(file);
                if (vm_flags & VM_EXECUTABLE) {
                        added_exe_file_vma(current->mm);
                        vma->vm_mm = current->mm;
@@ -1825,6 +1823,16 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
 }
 EXPORT_SYMBOL(remap_pfn_range);
 
+int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len)
+{
+       unsigned long pfn = start >> PAGE_SHIFT;
+       unsigned long vm_len = vma->vm_end - vma->vm_start;
+
+       pfn += vma->vm_pgoff;
+       return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot);
+}
+EXPORT_SYMBOL(vm_iomap_memory);
+
 int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
                        unsigned long pgoff)
 {
@@ -1875,7 +1883,7 @@ EXPORT_SYMBOL(unmap_mapping_range);
  */
 int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
 {
-       unsigned long free, allowed;
+       long free, allowed;
 
        vm_acct_memory(pages);