[FS] Implement block_page_mkwrite.
authorDavid Chinner <dgc@sgi.com>
Thu, 19 Jul 2007 07:39:55 +0000 (17:39 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Thu, 19 Jul 2007 09:50:50 +0000 (19:50 +1000)
commit5417169026c3df151adf5a65eb061278b0a72e69
treee4872a4243e12fe931ff6ac789df181b579b884c
parent589f1e81bde732dd0b1bc5d01b6bddd4bcb4527b
[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>
fs/buffer.c
include/linux/buffer_head.h