diff options
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 19b9bfc10349..3fb9a26b6f58 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -448,6 +448,8 @@ static int gfs2_block_pointers(struct inode *inode, u64 lblock, int create, | |||
448 | u64 dblock = 0; | 448 | u64 dblock = 0; |
449 | int boundary; | 449 | int boundary; |
450 | 450 | ||
451 | BUG_ON(maxlen == 0); | ||
452 | |||
451 | if (gfs2_assert_warn(sdp, !gfs2_is_stuffed(ip))) | 453 | if (gfs2_assert_warn(sdp, !gfs2_is_stuffed(ip))) |
452 | return 0; | 454 | return 0; |
453 | 455 | ||
@@ -561,7 +563,7 @@ int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsi | |||
561 | BUG_ON(!new); | 563 | BUG_ON(!new); |
562 | 564 | ||
563 | bmap_lock(inode, create); | 565 | bmap_lock(inode, create); |
564 | ret = gfs2_block_pointers(inode, lblock, create, &bh, &mp, *extlen); | 566 | ret = gfs2_block_pointers(inode, lblock, create, &bh, &mp, 32); |
565 | bmap_unlock(inode, create); | 567 | bmap_unlock(inode, create); |
566 | *extlen = bh.b_size >> inode->i_blkbits; | 568 | *extlen = bh.b_size >> inode->i_blkbits; |
567 | *dblock = bh.b_blocknr; | 569 | *dblock = bh.b_blocknr; |