summaryrefslogtreecommitdiffstats
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-07-20 14:56:40 +0000
commite308faf24f68e262d92d294a01ddca7a17e76762 (patch)
tree22c47cb315811834861f013067878ff664e95abd /mm/mprotect.c
parent30c6397ce63178fcb3e7963ac247f0a03132aca9 (diff)
Sync with Linux 2.1.46.
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r--mm/mprotect.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 2e46ca142..ddf4f4ed6 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -110,8 +110,7 @@ static inline int mprotect_fixup_start(struct vm_area_struct * vma,
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 @@ static inline int mprotect_fixup_end(struct vm_area_struct * vma,
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 @@ static inline int mprotect_fixup_middle(struct vm_area_struct * vma,
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);