diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-04 05:29:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:32 -0400 |
commit | 6e1db88d536adcbbfe562b2d4b7d6425784fff12 (patch) | |
tree | 8cfcb5a6190722db6249b2e4978f39247975abcf /fs/reiserfs | |
parent | f4e420dc423148fba637af1ab618fa8896dfb2d6 (diff) |
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/reiserfs')
-rw-r--r-- | fs/reiserfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 4c1fb548ab64..045729f5674a 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -2585,8 +2585,7 @@ static int reiserfs_write_begin(struct file *file, | |||
2585 | old_ref = th->t_refcount; | 2585 | old_ref = th->t_refcount; |
2586 | th->t_refcount++; | 2586 | th->t_refcount++; |
2587 | } | 2587 | } |
2588 | ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | 2588 | ret = __block_write_begin(page, pos, len, reiserfs_get_block); |
2589 | reiserfs_get_block); | ||
2590 | if (ret && reiserfs_transaction_running(inode->i_sb)) { | 2589 | if (ret && reiserfs_transaction_running(inode->i_sb)) { |
2591 | struct reiserfs_transaction_handle *th = current->journal_info; | 2590 | struct reiserfs_transaction_handle *th = current->journal_info; |
2592 | /* this gets a little ugly. If reiserfs_get_block returned an | 2591 | /* this gets a little ugly. If reiserfs_get_block returned an |