From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next
Date: Mon, 3 Aug 2015 13:17:31 -0400 (EDT) [thread overview]
Message-ID: <426920591.3409293.1438622251959.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <338955658.3406242.1438622031072.JavaMail.zimbra@redhat.com>
Hi,
This patch was inspired by Dan Carpenter's email from 17 July.
This patch adds some needed error checking after calling function
rhashtable_walk_next.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 1b0dff4..15227a7 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1794,6 +1794,11 @@ static void gfs2_glock_iter_next(struct gfs2_glock_rht_iter *gi)
{
do {
gi->gl = rhashtable_walk_next(&gi->hti);
+ if (IS_ERR(gi->gl)) {
+ if (PTR_ERR(gi->gl) == -EAGAIN)
+ continue;
+ gi->gl = NULL;
+ }
/* Skip entries for other sb and dead entries */
} while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) ||
__lockref_is_dead(&gi->gl->gl_lockref)));
next parent reply other threads:[~2015-08-03 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <338955658.3406242.1438622031072.JavaMail.zimbra@redhat.com>
2015-08-03 17:17 ` Bob Peterson [this message]
2015-08-03 20:30 ` [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next Dan Carpenter
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=426920591.3409293.1438622251959.JavaMail.zimbra@redhat.com \
--to=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;
as well as URLs for NNTP newsgroup(s).