patch-2.2.8 linux/mm/mmap.c
Next file: linux/mm/page_alloc.c
Previous file: linux/mm/filemap.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Tue May 4 15:44:38 1999
- Orig file:
v2.2.7/linux/mm/mmap.c
- Orig date:
Fri Apr 16 14:47:31 1999
diff -u --recursive --new-file v2.2.7/linux/mm/mmap.c linux/mm/mmap.c
@@ -176,6 +176,9 @@
struct vm_area_struct * vma;
int error;
+ if (file && (!file->f_op || !file->f_op->mmap))
+ return -ENODEV;
+
if ((len = PAGE_ALIGN(len)) == 0)
return addr;
@@ -244,9 +247,6 @@
* specific mapper. the address has already been validated, but
* not unmapped, but the maps are removed from the list.
*/
- if (file && (!file->f_op || !file->f_op->mmap))
- return -ENODEV;
-
vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
if (!vma)
return -ENOMEM;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)