From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Thu, 01 Mar 2012 10:23:18 +0000 Subject: [Cluster-devel] [GFS2 PATCH] Unlock rindex mutex on glock error In-Reply-To: References: Message-ID: <1330597398.2704.16.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Now in the -nmw git tree. Thanks, Steve. On Wed, 2012-02-29 at 15:15 -0500, Bob Peterson wrote: > Hi, > > This patch fixes an error path in function gfs2_rindex_update > that leaves the rindex mutex held. > > Regards, > > Bob Peterson > Red Hat File Systems > > Signed-off-by: Bob Peterson > -- > fs/gfs2/rgrp.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c > index 1446b4e..e09370e 100644 > --- a/fs/gfs2/rgrp.c > +++ b/fs/gfs2/rgrp.c > @@ -699,13 +699,14 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp) > if (!gfs2_glock_is_locked_by_me(gl)) { > error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); > if (error) > - return error; > + goto out_unlock; > unlock_required = 1; > } > if (!sdp->sd_rindex_uptodate) > error = gfs2_ri_update(ip); > if (unlock_required) > gfs2_glock_dq_uninit(&ri_gh); > +out_unlock: > mutex_unlock(&sdp->sd_rindex_mutex); > } > >