diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-12-20 10:00:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-12-20 10:00:10 +1100 |
commit | 0d6522326457f9dc3225d641bfd1acb91e9bc748 (patch) | |
tree | aaff58cd4c12d63070aaf49f800646da3f9f79a6 /fs | |
parent | 69657ae9f599282047cccf681e474cfa87751202 (diff) | |
parent | 14d37564fa3dc4e5d4c6828afcd26ac14e6796c5 (diff) |
Merge remote-tracking branch 'gfs2/for-next'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/glock.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 14cbf60167a7..2928f1209b67 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1802,16 +1802,18 @@ void gfs2_glock_exit(void) static void gfs2_glock_iter_next(struct gfs2_glock_iter *gi) { - do { - gi->gl = rhashtable_walk_next(&gi->hti); + while ((gi->gl = rhashtable_walk_next(&gi->hti))) { if (IS_ERR(gi->gl)) { if (PTR_ERR(gi->gl) == -EAGAIN) continue; gi->gl = NULL; + return; } - /* 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))); + /* Skip entries for other sb and dead entries */ + if (gi->sdp == gi->gl->gl_name.ln_sbd && + !__lockref_is_dead(&gi->gl->gl_lockref)) + return; + } } static void *gfs2_glock_seq_start(struct seq_file *seq, loff_t *pos) |