Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179362
b: refs/heads/master
c: 81759b5
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Jan 16, 2010
1 parent c8fbe2c commit 14bc544
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efc1a3b16930c41d64ffefde16b87d82f603a8a0
refs/heads/master: 81759b5b221107488bda99fe7beeb7b734f61133
7 changes: 6 additions & 1 deletion trunk/fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,22 @@ static int ramfs_nommu_check_mappings(struct inode *inode,
struct vm_area_struct *vma;
struct prio_tree_iter iter;

down_write(&nommu_region_sem);

/* search for VMAs that fall within the dead zone */
vma_prio_tree_foreach(vma, &iter, &inode->i_mapping->i_mmap,
newsize >> PAGE_SHIFT,
(size + PAGE_SIZE - 1) >> PAGE_SHIFT
) {
/* found one - only interested if it's shared out of the page
* cache */
if (vma->vm_flags & VM_SHARED)
if (vma->vm_flags & VM_SHARED) {
up_write(&nommu_region_sem);
return -ETXTBSY; /* not quite true, but near enough */
}
}

up_write(&nommu_region_sem);
return 0;
}

Expand Down

0 comments on commit 14bc544

Please sign in to comment.