diff options
author | Bob Peterson <rpeterso@redhat.com> | 2007-12-10 15:13:27 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-01-25 03:08:25 -0500 |
commit | e9e1ef2b6ee401d7c1e1eb38052857b4b206d172 (patch) | |
tree | 68dff93cf4058eb06b162d800f08ff7752cd1a55 /fs/gfs2/bmap.c | |
parent | 2066b58b0a038d7aedd24133677efb8856cac3a1 (diff) |
[GFS2] Remove function gfs2_get_block
This patch is just a cleanup. Function gfs2_get_block() just calls
function gfs2_block_map reversing the last two parameters. By
reversing the parameters, gfs2_block_map() may be called directly
and function gfs2_get_block may be eliminated altogether.
Since this function is done for every block operation,
this streamlines the code and makes it a little bit more efficient.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 1cfd493e30fb..49486029edc2 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -452,8 +452,8 @@ static inline void bmap_unlock(struct inode *inode, int create) | |||
452 | * Returns: errno | 452 | * Returns: errno |
453 | */ | 453 | */ |
454 | 454 | ||
455 | int gfs2_block_map(struct inode *inode, u64 lblock, int create, | 455 | int gfs2_block_map(struct inode *inode, sector_t lblock, |
456 | struct buffer_head *bh_map) | 456 | struct buffer_head *bh_map, int create) |
457 | { | 457 | { |
458 | struct gfs2_inode *ip = GFS2_I(inode); | 458 | struct gfs2_inode *ip = GFS2_I(inode); |
459 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 459 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
@@ -559,7 +559,7 @@ int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsi | |||
559 | BUG_ON(!new); | 559 | BUG_ON(!new); |
560 | 560 | ||
561 | bh.b_size = 1 << (inode->i_blkbits + 5); | 561 | bh.b_size = 1 << (inode->i_blkbits + 5); |
562 | ret = gfs2_block_map(inode, lblock, create, &bh); | 562 | ret = gfs2_block_map(inode, lblock, &bh, create); |
563 | *extlen = bh.b_size >> inode->i_blkbits; | 563 | *extlen = bh.b_size >> inode->i_blkbits; |
564 | *dblock = bh.b_blocknr; | 564 | *dblock = bh.b_blocknr; |
565 | if (buffer_new(&bh)) | 565 | if (buffer_new(&bh)) |
@@ -909,7 +909,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping) | |||
909 | err = 0; | 909 | err = 0; |
910 | 910 | ||
911 | if (!buffer_mapped(bh)) { | 911 | if (!buffer_mapped(bh)) { |
912 | gfs2_get_block(inode, iblock, bh, 0); | 912 | gfs2_block_map(inode, iblock, bh, 0); |
913 | /* unmapped? It's a hole - nothing to do */ | 913 | /* unmapped? It's a hole - nothing to do */ |
914 | if (!buffer_mapped(bh)) | 914 | if (!buffer_mapped(bh)) |
915 | goto unlock; | 915 | goto unlock; |