[Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c

Dan Carpenter dan.carpenter at oracle.com
Mon Jan 26 07:57:42 UTC 2015


On Sat, Jan 24, 2015 at 08:19:47PM +0000, Steven Whitehouse wrote:
> Hi,
> 
> On 24/01/15 19:45, Dan Carpenter wrote:
> >Hello Steven Whitehouse,
> >
> >The [some really old patch], leads to the following static checker
> >warning:
> >
> >	fs/gfs2/inode.c:203 gfs2_inode_lookup()
> >	error: passing non negative 13 to ERR_PTR
> >
> >fs/gfs2/inode.c
> >    167                  set_bit(GIF_INVALID, &ip->i_flags);
> >    168                  error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh);
> >                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >It looks like this function can return GLR_TRYFAILED.  The caller is
> >only expecting normal ERR_PTRs so it could cause an oops.
> This does not request a try lock, so it should never return the
> GLR_TRYFAILED value. I think the checker is perhaps not following
> the code well enough to figure that out?

Ooo..  Yes.  That's too tricky for the static checker.  Thanks for
looking into this.

regards,
dan carpenter




More information about the Cluster-devel mailing list