patch-2.1.106 linux/mm/filemap.c
Next file: linux/mm/memory.c
Previous file: linux/kernel/sysctl.c
Back to the patch index
Back to the overall index
-  Lines: 16
-  Date:
Tue Jun  9 10:34:03 1998
-  Orig file: 
v2.1.105/linux/mm/filemap.c
-  Orig date: 
Thu Mar 26 15:57:06 1998
diff -u --recursive --new-file v2.1.105/linux/mm/filemap.c linux/mm/filemap.c
@@ -1256,6 +1256,7 @@
 	struct vm_area_struct * vma;
 	int unmapped_error, error = -EINVAL;
 
+	down(¤t->mm->mmap_sem);
 	lock_kernel();
 	if (start & ~PAGE_MASK)
 		goto out;
@@ -1303,6 +1304,7 @@
 	}
 out:
 	unlock_kernel();
+	up(¤t->mm->mmap_sem);
 	return error;
 }
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov