cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next
       [not found] <338955658.3406242.1438622031072.JavaMail.zimbra@redhat.com>
@ 2015-08-03 17:17 ` Bob Peterson
  2015-08-03 20:30   ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2015-08-03 17:17 UTC (permalink / raw)
  To: cluster-devel.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)));



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next
  2015-08-03 17:17 ` [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next Bob Peterson
@ 2015-08-03 20:30   ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-08-03 20:30 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On Mon, Aug 03, 2015 at 01:17:31PM -0400, Bob Peterson wrote:
> Hi,
> 
> This patch was inspired by Dan Carpenter's email from 17 July.
> 

Heh.  I looked through my out box from July 17 and I only see pointer
math patches.  Ah...  Here I've found the email.  :)  Ah here it is, I
reported a static checker bug here.

> This patch adds some needed error checking after calling function
> rhashtable_walk_next.
> 

Looks good.

regards,
dan carpenter



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-03 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <338955658.3406242.1438622031072.JavaMail.zimbra@redhat.com>
2015-08-03 17:17 ` [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next Bob Peterson
2015-08-03 20:30   ` Dan Carpenter

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).