diff options
-rw-r--r-- | fs/gfs2/rgrp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 809fecd82970..1ccf89ab42b6 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -1944,15 +1944,16 @@ int gfs2_inplace_reserve(struct gfs2_inode *ip, const struct gfs2_alloc_parms *a | |||
1944 | return 0; | 1944 | return 0; |
1945 | } | 1945 | } |
1946 | 1946 | ||
1947 | /* Drop reservation, if we couldn't use reserved rgrp */ | ||
1948 | if (gfs2_rs_active(rs)) | ||
1949 | gfs2_rs_deltree(rs); | ||
1950 | check_rgrp: | 1947 | check_rgrp: |
1951 | /* Check for unlinked inodes which can be reclaimed */ | 1948 | /* Check for unlinked inodes which can be reclaimed */ |
1952 | if (rs->rs_rbm.rgd->rd_flags & GFS2_RDF_CHECK) | 1949 | if (rs->rs_rbm.rgd->rd_flags & GFS2_RDF_CHECK) |
1953 | try_rgrp_unlink(rs->rs_rbm.rgd, &last_unlinked, | 1950 | try_rgrp_unlink(rs->rs_rbm.rgd, &last_unlinked, |
1954 | ip->i_no_addr); | 1951 | ip->i_no_addr); |
1955 | skip_rgrp: | 1952 | skip_rgrp: |
1953 | /* Drop reservation, if we couldn't use reserved rgrp */ | ||
1954 | if (gfs2_rs_active(rs)) | ||
1955 | gfs2_rs_deltree(rs); | ||
1956 | |||
1956 | /* Unlock rgrp if required */ | 1957 | /* Unlock rgrp if required */ |
1957 | if (!rg_locked) | 1958 | if (!rg_locked) |
1958 | gfs2_glock_dq_uninit(&rs->rs_rgd_gh); | 1959 | gfs2_glock_dq_uninit(&rs->rs_rgd_gh); |