From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Mon, 26 Jan 2015 10:57:42 +0300 Subject: [Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c In-Reply-To: <54C3FE63.7040906@redhat.com> References: <20150124194503.GA22383@mwanda> <54C3FE63.7040906@redhat.com> Message-ID: <20150126075742.GT6507@mwanda> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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