From: Steven Whitehouse Date: Fri, 23 Mar 2012 10:54:58 +0000 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: put glock reference in error patch of read_rindex_entry In-Reply-To: <2e1eb939-5128-4df6-b390-983703e64abc@zmail12.collab.prod.int.phx2.redhat.com> References: <2e1eb939-5128-4df6-b390-983703e64abc@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <1332500098.2576.41.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, On Thu, 2012-03-22 at 08:58 -0400, Bob Peterson wrote: > Hi, > > This patch fixes the error path of function read_rindex_entry > so that it correctly gives up its glock reference in cases where > there is a race to re-read the rindex after gfs2_grow. > > Regards, > I'll add this to the -fixes tree shortly, Steve. > Bob Peterson > Red Hat File Systems > > Signed-off-by: Bob Peterson > --- > diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c > index 19bde40..19354a2 100644 > --- a/fs/gfs2/rgrp.c > +++ b/fs/gfs2/rgrp.c > @@ -640,6 +640,7 @@ static int read_rindex_entry(struct gfs2_inode *ip, > return 0; > > error = 0; /* someone else read in the rgrp; free it and ignore it */ > + gfs2_glock_put(rgd->rd_gl); > > fail: > kfree(rgd->rd_bits); >