diff options
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 5476c066d4ee..ae7d205de0d1 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -780,7 +780,11 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
780 | if (metadata) | 780 | if (metadata) |
781 | revokes = (height) ? sdp->sd_inptrs : sdp->sd_diptrs; | 781 | revokes = (height) ? sdp->sd_inptrs : sdp->sd_diptrs; |
782 | 782 | ||
783 | error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh); | 783 | if (ip != GFS2_I(sdp->sd_rindex)) |
784 | error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh); | ||
785 | else if (!sdp->sd_rgrps) | ||
786 | error = gfs2_ri_update(ip); | ||
787 | |||
784 | if (error) | 788 | if (error) |
785 | return error; | 789 | return error; |
786 | 790 | ||
@@ -879,7 +883,8 @@ out_rg_gunlock: | |||
879 | out_rlist: | 883 | out_rlist: |
880 | gfs2_rlist_free(&rlist); | 884 | gfs2_rlist_free(&rlist); |
881 | out: | 885 | out: |
882 | gfs2_glock_dq_uninit(&ip->i_alloc->al_ri_gh); | 886 | if (ip != GFS2_I(sdp->sd_rindex)) |
887 | gfs2_glock_dq_uninit(&ip->i_alloc->al_ri_gh); | ||
883 | return error; | 888 | return error; |
884 | } | 889 | } |
885 | 890 | ||