patch-2.1.89 linux/kernel/fork.c
Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Fri Feb 27 10:44:16 1998
- Orig file:
v2.1.88/linux/kernel/fork.c
- Orig date:
Fri Jan 23 18:10:32 1998
diff -u --recursive --new-file v2.1.88/linux/kernel/fork.c linux/kernel/fork.c
@@ -211,7 +211,7 @@
flush_cache_mm(current->mm);
pprev = &mm->mmap;
for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
- struct dentry *dentry;
+ struct file *file;
retval = -ENOMEM;
tmp = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
@@ -222,11 +222,11 @@
tmp->vm_mm = mm;
mm->map_count++;
tmp->vm_next = NULL;
- dentry = tmp->vm_dentry;
- if (dentry) {
- dget(dentry);
+ file = tmp->vm_file;
+ if (file) {
+ file->f_count++;
if (tmp->vm_flags & VM_DENYWRITE)
- dentry->d_inode->i_writecount--;
+ file->f_dentry->d_inode->i_writecount--;
/* insert tmp into the share list, just after mpnt */
if((tmp->vm_next_share = mpnt->vm_next_share) != NULL)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov