Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169204
b: refs/heads/master
c: 2c77634
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Dec 3, 2009
1 parent 2021ef8 commit 34ab20d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 1579343a73e32b5886e186e8f3e4db85e420ed3f
refs/heads/master: 2c77634965ee28c8b4790ffb5e83dd5ff7ac8988
14 changes: 10 additions & 4 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,11 +1710,16 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)
{
struct gfs2_rgrpd *rgd;
struct gfs2_holder ri_gh, rgd_gh;
struct gfs2_inode *ip = GFS2_I(sdp->sd_rindex);
int ri_locked = 0;
int error;

error = gfs2_rindex_hold(sdp, &ri_gh);
if (error)
goto fail;
if (!gfs2_glock_is_locked_by_me(ip->i_gl)) {
error = gfs2_rindex_hold(sdp, &ri_gh);
if (error)
goto fail;
ri_locked = 1;
}

error = -EINVAL;
rgd = gfs2_blk2rgrpd(sdp, no_addr);
Expand All @@ -1730,7 +1735,8 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)

gfs2_glock_dq_uninit(&rgd_gh);
fail_rindex:
gfs2_glock_dq_uninit(&ri_gh);
if (ri_locked)
gfs2_glock_dq_uninit(&ri_gh);
fail:
return error;
}
Expand Down

0 comments on commit 34ab20d

Please sign in to comment.