]> git.neil.brown.name Git - history.git/commitdiff
Fix double i_writecount handling (Tony Luck)
authorLinus Torvalds <torvalds@home.transmeta.com>
Mon, 20 May 2002 13:01:40 +0000 (06:01 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 20 May 2002 13:01:40 +0000 (06:01 -0700)
mm/mmap.c

index c343cf02784ccec1bde528361c7127c94c4ba67c..dee8e7c14103e002bafd32510a1ac7157699a832 100644 (file)
--- 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);