aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-10-13 17:25:45 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-20 09:13:40 -0400
commit23591256d61354e20f12e98d7a496ad5c23de74c (patch)
tree3013a6e873a6e0a1d55fbace2fba638a978108c0 /fs/gfs2/ops_address.c
parent42fb00838a644d03f9a2a5fbbe0b668a5ff5df4d (diff)
[GFS2] Fix bmap to map extents properly
This fix means that bmap will map extents of the length requested by the VFS rather than guessing at it, or just mapping one block at a time. The other callers of gfs2_block_map are audited to ensure they send the correct max extent lengths (i.e. set bh->b_size correctly). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index e0599fed99ce..8d5963c7e123 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -65,7 +65,7 @@ static void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page,
65int gfs2_get_block(struct inode *inode, sector_t lblock, 65int gfs2_get_block(struct inode *inode, sector_t lblock,
66 struct buffer_head *bh_result, int create) 66 struct buffer_head *bh_result, int create)
67{ 67{
68 return gfs2_block_map(inode, lblock, create, bh_result, 32); 68 return gfs2_block_map(inode, lblock, create, bh_result);
69} 69}
70 70
71/** 71/**
@@ -83,7 +83,7 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
83{ 83{
84 int error; 84 int error;
85 85
86 error = gfs2_block_map(inode, lblock, 0, bh_result, 1); 86 error = gfs2_block_map(inode, lblock, 0, bh_result);
87 if (error) 87 if (error)
88 return error; 88 return error;
89 if (bh_result->b_blocknr == 0) 89 if (bh_result->b_blocknr == 0)
@@ -94,7 +94,7 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
94static int gfs2_get_block_direct(struct inode *inode, sector_t lblock, 94static int gfs2_get_block_direct(struct inode *inode, sector_t lblock,
95 struct buffer_head *bh_result, int create) 95 struct buffer_head *bh_result, int create)
96{ 96{
97 return gfs2_block_map(inode, lblock, 0, bh_result, 32); 97 return gfs2_block_map(inode, lblock, 0, bh_result);
98} 98}
99 99
100/** 100/**