Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76049
b: refs/heads/master
c: b0d5fd3
h: refs/heads/master
i:
  76047: 7adcd5b
v: v3
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Jan 25, 2008
1 parent f7df6dd commit 444a64c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 398bbe68321947f6763fbc259a01eb548ce19408
refs/heads/master: b0d5fd307463405fe1f57494fbb37f810715ed6d
14 changes: 7 additions & 7 deletions trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ int gfs2_block_map(struct inode *inode, sector_t lblock,
unsigned int maxlen = bh_map->b_size >> inode->i_blkbits;
struct metapath mp;
u64 size;
struct buffer_head *dibh = NULL;

BUG_ON(maxlen == 0);

Expand Down Expand Up @@ -499,6 +500,8 @@ int gfs2_block_map(struct inode *inode, sector_t lblock,
error = gfs2_meta_inode_buffer(ip, &bh);
if (error)
goto out_fail;
dibh = bh;
get_bh(dibh);

for (x = 0; x < end_of_metadata; x++) {
lookup_block(ip, bh, x, &mp, create, &new, &dblock);
Expand All @@ -517,13 +520,8 @@ int gfs2_block_map(struct inode *inode, sector_t lblock,
if (boundary)
set_buffer_boundary(bh_map);
if (new) {
struct buffer_head *dibh;
error = gfs2_meta_inode_buffer(ip, &dibh);
if (!error) {
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(ip, dibh->b_data);
brelse(dibh);
}
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(ip, dibh->b_data);
set_buffer_new(bh_map);
goto out_brelse;
}
Expand All @@ -544,6 +542,8 @@ int gfs2_block_map(struct inode *inode, sector_t lblock,
out_ok:
error = 0;
out_fail:
if (dibh)
brelse(dibh);
bmap_unlock(inode, create);
return error;
}
Expand Down

0 comments on commit 444a64c

Please sign in to comment.