Messages in this thread | | | From | Andreas Gruenbacher <> | Date | Thu, 29 Mar 2018 00:58:49 +0200 | Subject | Re: [PATCH] gfs2: Stop using rhashtable_walk_peek |
| |
On 28 March 2018 at 23:53, NeilBrown <neilb@suse.com> wrote: > Thank for this patch! > The above looks a bit fragile to me. > gfs2_glock_iter_next() (And hence gfs2_glock_seq_start()) will sometimes > exit with gl_held true, and sometimes with it false. > gfs2_glock_seq_stop() assumes that it is false. > Normally gfs2_glock_seq_next() will normally be called between these > two and will clear gl_held, but I don't think there is a hard guarantee > of that. > Maybe we should always 'put' gi->gl in iter_next if gl_held??
Another problem is that gfs2_glock_seq_stop only does a lockref_get which is not allowed because the lockref may have been marked dead in the meantime. We'll have to take a reference on each lock in gfs2_glock_iter_next instead. Revised patch to follow tomorrow.
Thanks, Andreas
| |