summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-04 11:29:57 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 22:47:32 +0200
commit6e1db88d536adcbbfe562b2d4b7d6425784fff12 (patch)
tree8cfcb5a6190722db6249b2e4978f39247975abcf /fs/ufs
parentclean up write_begin usage for directories in pagecache (diff)
downloadlinux-6e1db88d536adcbbfe562b2d4b7d6425784fff12.tar.xz
linux-6e1db88d536adcbbfe562b2d4b7d6425784fff12.zip
introduce __block_write_begin
Split up the block_write_begin implementation - __block_write_begin is a new trivial wrapper for block_prepare_write that always takes an already allocated page and can be either called from block_write_begin or filesystem code that already has a page allocated. Remove the handling of already allocated pages from block_write_begin after switching all callers that do it to __block_write_begin. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index a9555b1ffd28..45ce32391f8f 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -560,8 +560,7 @@ static int ufs_readpage(struct file *file, struct page *page)
int ufs_prepare_chunk(struct page *page, loff_t pos, unsigned len)
{
- return block_write_begin_newtrunc(NULL, page->mapping, pos, len, 0,
- &page, NULL, ufs_getfrag_block);
+ return __block_write_begin(page, pos, len, ufs_getfrag_block);
}
static int ufs_write_begin(struct file *file, struct address_space *mapping,