patch-2.1.45 linux/mm/mprotect.c
Next file: linux/mm/mremap.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Sun Jul 13 21:20:11 1997
- Orig file:
v2.1.44/linux/mm/mprotect.c
- Orig date:
Mon Jun 16 16:36:01 1997
diff -u --recursive --new-file v2.1.44/linux/mm/mprotect.c linux/mm/mprotect.c
@@ -110,8 +110,7 @@
vma->vm_offset += vma->vm_start - n->vm_start;
n->vm_flags = newflags;
n->vm_page_prot = prot;
- if (n->vm_inode)
- atomic_inc(&n->vm_inode->i_count);
+ n->vm_dentry = dget(n->vm_dentry);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
insert_vm_struct(current->mm, n);
@@ -133,8 +132,7 @@
n->vm_offset += n->vm_start - vma->vm_start;
n->vm_flags = newflags;
n->vm_page_prot = prot;
- if (n->vm_inode)
- atomic_inc(&n->vm_inode->i_count);
+ n->vm_dentry = dget(n->vm_dentry);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
insert_vm_struct(current->mm, n);
@@ -165,8 +163,8 @@
right->vm_offset += right->vm_start - left->vm_start;
vma->vm_flags = newflags;
vma->vm_page_prot = prot;
- if (vma->vm_inode)
- atomic_add(2, &vma->vm_inode->i_count);
+ if (vma->vm_dentry)
+ vma->vm_dentry->d_count += 2;
if (vma->vm_ops && vma->vm_ops->open) {
vma->vm_ops->open(left);
vma->vm_ops->open(right);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov