summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-05-20 06:01:40 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-05-20 06:01:40 -0700
commitc0713be8ed73198328614a4bb038121a7d3809a5 (patch)
treeaaa17cecb63fc5729b7200d0e6b94a9bb272a6bd
parent99ef44b79de47f23869897c11493521a1e42b2d2 (diff)
Fix double i_writecount handling (Tony Luck)
-rw-r--r--mm/mmap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index c343cf02784c..dee8e7c14103 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -911,12 +911,8 @@ static int splitvma(struct mm_struct *mm, struct vm_area_struct *mpnt, unsigned
new->vm_start = addr;
new->vm_pgoff = mpnt->vm_pgoff + ((addr - mpnt->vm_start) >> PAGE_SHIFT);
new->vm_raend = 0;
- if (mpnt->vm_file) {
- struct file *file = mpnt->vm_file;
- get_file(file);
- if (mpnt->vm_flags & VM_DENYWRITE)
- atomic_dec(&file->f_dentry->d_inode->i_writecount);
- }
+ if (mpnt->vm_file)
+ get_file(mpnt->vm_file);
if (mpnt->vm_ops && mpnt->vm_ops->open)
mpnt->vm_ops->open(mpnt);