summaryrefslogtreecommitdiff
path: root/fs/ramfs/file-nommu.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 21:20:18 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 21:20:18 (GMT)
commit56012808f4d5606e401539f663d92009d964425b (patch)
treef3736a97725647393a2db7c95462d857115197ca /fs/ramfs/file-nommu.c
parenta814290e17ae314bd614476cffc6119846eca27e (diff)
parentb2a731aa5cbca7e0252da75e16de7ae5feb1313a (diff)
downloadlinux-fsl-qoriq-56012808f4d5606e401539f663d92009d964425b.tar.xz
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel-stable
Conflicts: arch/arm/Makefile
Diffstat (limited to 'fs/ramfs/file-nommu.c')
-rw-r--r--fs/ramfs/file-nommu.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 2efc571..1739a4a 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -123,30 +123,6 @@ add_error:
/*****************************************************************************/
/*
- * check that file shrinkage doesn't leave any VMAs dangling in midair
- */
-static int ramfs_nommu_check_mappings(struct inode *inode,
- size_t newsize, size_t size)
-{
- struct vm_area_struct *vma;
- struct prio_tree_iter iter;
-
- /* 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)
- return -ETXTBSY; /* not quite true, but near enough */
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-/*
*
*/
static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size)
@@ -164,7 +140,7 @@ static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size)
/* check that a decrease in size doesn't cut off any shared mappings */
if (newsize < size) {
- ret = ramfs_nommu_check_mappings(inode, newsize, size);
+ ret = nommu_shrink_inode_mappings(inode, size, newsize);
if (ret < 0)
return ret;
}