From: Steven Whitehouse <swhiteho@redhat.com>
To: linux-kernel@vger.kernel.org, cluster-devel@redhat.com
Cc: Bob Peterson <rpeterso@redhat.com>,
Steven Whitehouse <swhiteho@redhat.com>
Subject: [PATCH 06/12] GFS2: Unlock rindex mutex on glock error
Date: Mon, 19 Mar 2012 10:25:22 +0000 [thread overview]
Message-ID: <1332152728-4027-7-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1332152728-4027-1-git-send-email-swhiteho@redhat.com>
From: Bob Peterson <rpeterso@redhat.com>
This patch fixes an error path in function gfs2_rindex_update
that leaves the rindex mutex held.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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);
}
--
1.7.4
next prev parent reply other threads:[~2012-03-19 10:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 10:25 GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2012-03-19 10:25 ` [PATCH 01/12] GFS2: glock statistics gathering Steven Whitehouse
2012-03-19 10:25 ` [PATCH 02/12] GFS2: Move two functions from log.c to lops.c Steven Whitehouse
2012-03-19 10:25 ` [PATCH 03/12] GFS2: FITRIM ioctl support Steven Whitehouse
2012-03-19 10:25 ` [PATCH 04/12] GFS2: Sort the ordered write list Steven Whitehouse
2012-03-19 10:25 ` [PATCH 05/12] GFS2: Make bd_cmp() static Steven Whitehouse
2012-03-19 10:25 ` Steven Whitehouse [this message]
2012-03-19 10:25 ` [PATCH 07/12] GFS2: Eliminate sd_rindex_mutex Steven Whitehouse
2012-03-19 10:25 ` [PATCH 08/12] GFS2: make sure rgrps are up to date in func gfs2_blk2rgrpd Steven Whitehouse
2012-03-19 10:25 ` [PATCH 09/12] GFS2: Flush pending glock work when evicting an inode Steven Whitehouse
2012-03-19 10:25 ` [PATCH 10/12] GFS2: Remove a __GFP_NOFAIL allocation Steven Whitehouse
2012-03-19 10:25 ` [PATCH 11/12] GFS2: Clean up log flush header writing Steven Whitehouse
2012-03-19 10:25 ` [PATCH 12/12] GFS2: call gfs2_write_alloc_required for each chunk Steven Whitehouse
2012-03-19 14:45 ` GFS2: Pre-pull patch posting (merge window) Randy Dunlap
2012-03-19 14:59 ` Steven Whitehouse
2012-03-19 15:18 ` Randy Dunlap
2012-03-19 15:34 ` Steven Whitehouse
2012-03-23 19:41 ` David Teigland
2012-03-23 19:46 ` David Miller
2012-03-23 20:06 ` Randy Dunlap
2012-03-23 20:09 ` Steven Whitehouse
2012-03-23 20:18 ` David Teigland
2012-03-23 22:06 ` Benjamin Poirier
2012-03-23 22:48 ` Randy Dunlap
2012-03-26 10:44 ` Steven Whitehouse
2012-04-02 15:35 ` Randy Dunlap
2012-04-02 15:47 ` Steven Whitehouse
2012-03-23 22:06 ` Randy Dunlap
2012-03-20 9:47 ` Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332152728-4027-7-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpeterso@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®