aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authornpiggin@suse.de <npiggin@suse.de>2009-08-20 12:35:05 -0400
committeral <al@dizzy.pdmi.ras.ru>2009-09-24 08:41:47 -0400
commit25d9e2d15286281ec834b829a4aaf8969011f1cd (patch)
treee4329a481ca197afae30f04335e023c7d04f7d67 /include/linux/mm.h
parenteca6f534e61919b28fb21aafbd1c2983deae75be (diff)
truncate: new helpers
Introduce new truncate helpers truncate_pagecache and inode_newsize_ok. vmtruncate is also consolidated from mm/memory.c and mm/nommu.c and into mm/truncate.c. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b6eae5e3144b..8347e938fb2f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -791,8 +791,9 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
791 unmap_mapping_range(mapping, holebegin, holelen, 0); 791 unmap_mapping_range(mapping, holebegin, holelen, 0);
792} 792}
793 793
794extern int vmtruncate(struct inode * inode, loff_t offset); 794extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
795extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); 795extern int vmtruncate(struct inode *inode, loff_t offset);
796extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
796 797
797#ifdef CONFIG_MMU 798#ifdef CONFIG_MMU
798extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, 799extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,