diff options
author | Christoph Hellwig <hch@lst.de> | 2010-10-06 04:47:23 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:18:20 -0400 |
commit | ebdec241d509cf69f6ebf1ecdc036359d3dbe154 (patch) | |
tree | e3c23f9b213936cb8501c83f55522a01f4a69aca /fs/gfs2 | |
parent | 56b0dacfa2b8416815a2f2a5f4f51e46be4cf14c (diff) |
fs: kill block_prepare_write
__block_write_begin and block_prepare_write are identical except for slightly
different calling conventions. Convert all callers to the __block_write_begin
calling conventions and drop block_prepare_write.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/aops.c | 3 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 6b24afb96aae..4f36f8832b9b 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c | |||
@@ -618,7 +618,6 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, | |||
618 | struct gfs2_alloc *al = NULL; | 618 | struct gfs2_alloc *al = NULL; |
619 | pgoff_t index = pos >> PAGE_CACHE_SHIFT; | 619 | pgoff_t index = pos >> PAGE_CACHE_SHIFT; |
620 | unsigned from = pos & (PAGE_CACHE_SIZE - 1); | 620 | unsigned from = pos & (PAGE_CACHE_SIZE - 1); |
621 | unsigned to = from + len; | ||
622 | struct page *page; | 621 | struct page *page; |
623 | 622 | ||
624 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh); | 623 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh); |
@@ -691,7 +690,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping, | |||
691 | } | 690 | } |
692 | 691 | ||
693 | prepare_write: | 692 | prepare_write: |
694 | error = block_prepare_write(page, from, to, gfs2_block_map); | 693 | error = __block_write_begin(page, from, len, gfs2_block_map); |
695 | out: | 694 | out: |
696 | if (error == 0) | 695 | if (error == 0) |
697 | return 0; | 696 | return 0; |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 0534510200d5..48a274f1674c 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -1294,7 +1294,7 @@ static int write_empty_blocks(struct page *page, unsigned from, unsigned to) | |||
1294 | int error; | 1294 | int error; |
1295 | 1295 | ||
1296 | if (!page_has_buffers(page)) { | 1296 | if (!page_has_buffers(page)) { |
1297 | error = block_prepare_write(page, from, to, gfs2_block_map); | 1297 | error = __block_write_begin(page, from, to - from, gfs2_block_map); |
1298 | if (unlikely(error)) | 1298 | if (unlikely(error)) |
1299 | return error; | 1299 | return error; |
1300 | 1300 | ||
@@ -1313,7 +1313,7 @@ static int write_empty_blocks(struct page *page, unsigned from, unsigned to) | |||
1313 | next += bh->b_size; | 1313 | next += bh->b_size; |
1314 | if (buffer_mapped(bh)) { | 1314 | if (buffer_mapped(bh)) { |
1315 | if (end) { | 1315 | if (end) { |
1316 | error = block_prepare_write(page, start, end, | 1316 | error = __block_write_begin(page, start, end - start, |
1317 | gfs2_block_map); | 1317 | gfs2_block_map); |
1318 | if (unlikely(error)) | 1318 | if (unlikely(error)) |
1319 | return error; | 1319 | return error; |
@@ -1328,7 +1328,7 @@ static int write_empty_blocks(struct page *page, unsigned from, unsigned to) | |||
1328 | } while (next < to); | 1328 | } while (next < to); |
1329 | 1329 | ||
1330 | if (end) { | 1330 | if (end) { |
1331 | error = block_prepare_write(page, start, end, gfs2_block_map); | 1331 | error = __block_write_begin(page, start, end - start, gfs2_block_map); |
1332 | if (unlikely(error)) | 1332 | if (unlikely(error)) |
1333 | return error; | 1333 | return error; |
1334 | empty_write_end(page, start, end); | 1334 | empty_write_end(page, start, end); |