aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-07-19 03:39:55 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-07-19 05:50:50 -0400
commit5417169026c3df151adf5a65eb061278b0a72e69 (patch)
treee4872a4243e12fe931ff6ac789df181b579b884c /include/linux
parent589f1e81bde732dd0b1bc5d01b6bddd4bcb4527b (diff)
[FS] Implement block_page_mkwrite.
Many filesystems need a ->page-mkwrite callout to correctly set up pages that have been written to by mmap. This is especially important when mmap is writing into holes as it allows filesystems to correctly account for and allocate space before the mmap write is allowed to proceed. Protection against truncate races is provided by locking the page and checking to see whether the page mapping is correct and whether it is beyond EOF so we don't end up allowing allocations beyond the current EOF or changing EOF as a result of a mmap write. SGI-PV: 940392 SGI-Modid: 2.6.x-xfs-melb:linux:29146a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/buffer_head.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 5c6e12853a9b..35cadad84b14 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -209,6 +209,8 @@ int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
209int generic_cont_expand(struct inode *inode, loff_t size); 209int generic_cont_expand(struct inode *inode, loff_t size);
210int generic_cont_expand_simple(struct inode *inode, loff_t size); 210int generic_cont_expand_simple(struct inode *inode, loff_t size);
211int block_commit_write(struct page *page, unsigned from, unsigned to); 211int block_commit_write(struct page *page, unsigned from, unsigned to);
212int block_page_mkwrite(struct vm_area_struct *vma, struct page *page,
213 get_block_t get_block);
212void block_sync_page(struct page *); 214void block_sync_page(struct page *);
213sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); 215sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
214int generic_commit_write(struct file *, struct page *, unsigned, unsigned); 216int generic_commit_write(struct file *, struct page *, unsigned, unsigned);