From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Date: Tue, 31 Aug 2021 17:01:48 +0200 Subject: [Cluster-devel] [bug report] new ->follow_link() and ->put_link() calling conventions In-Reply-To: <20210831100729.GA16317@kili> References: <20210831100729.GA16317@kili> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Dan, On Tue, Aug 31, 2021 at 12:15 PM Dan Carpenter wrote: > Hello GFS2 devs, > > The ancient patch 680baacbca69: "new ->follow_link() and ->put_link() > calling conventions" from May 2, 2015, leads to the following > Smatch static checker warning: > > fs/gfs2/inode.c:1806 gfs2_get_link() > error: passing non negative 13 to ERR_PTR this looks like a false positive: gh->gh_error will only be set to GLR_TRYFAILED when try_futile is true, and try_futile will only be true when the LM_FLAG_TRY or LM_FLAG_TRY_1CB flag in gh->gh_flags is set. The code is a bit convoluted, and it's not surprising that smatch doesn't understand what's going on. Thanks, Andreas