[Cluster-devel] GFS2: Use resizable hash table for glocks

Dan Carpenter <[email protected]>
Newsgroups com.redhat.cluster-devel
Message-ID <20150715111349.GB16569@mwanda>
Hello Bob Peterson,

The patch 6afe4c76af37: "GFS2: Use resizable hash table for glocks"
from Mar 16, 2015, leads to the following static checker warning:

	fs/gfs2/glock.c:1798 gfs2_glock_iter_next()
	error: 'gi->gl' dereferencing possible ERR_PTR()

fs/gfs2/glock.c
  1793  static void gfs2_glock_iter_next(struct gfs2_glock_rht_iter *gi)
  1794  {
  1795          do {
  1796                  gi->gl = rhashtable_walk_next(&gi->hti);
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
can return -EAGAIN sometimes.

  1797          /* Skip entries for other sb and dead entries */
  1798          } while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) ||
                                                  ^^^^^^^^
Might be an issue here, might not.  I don't know the subsystem well
enough to know when it returns NULL vs -EAGAIN.

  1799                                __lockref_is_dead(&gi->gl->gl_lockref)));
  1800  }

regards,
dan carpenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.