Commit c0713be8 authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

Fix double i_writecount handling (Tony Luck)

parent 99ef44b7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment