From owner-cvs-all@FreeBSD.ORG Sat Jan 21 20:37:29 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D3F116A41F; Sat, 21 Jan 2006 20:37:29 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48EA843D58; Sat, 21 Jan 2006 20:37:28 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail17.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0LKbQsq023743 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 22 Jan 2006 07:37:26 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0LKbOHh033629; Sun, 22 Jan 2006 07:37:26 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0LKbOaq033628; Sun, 22 Jan 2006 07:37:24 +1100 (EST) (envelope-from pjeremy) Date: Sun, 22 Jan 2006 07:37:23 +1100 From: Peter Jeremy To: Tom Rhodes Message-ID: <20060121203723.GT25397@cirb503493.alcatel.com.au> References: <200601211210.k0LCAXYl069896@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601211210.k0LCAXYl069896@repoman.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/nfsserver nfs_serv.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2006 20:37:29 -0000 On Sat, 2006-Jan-21 12:10:33 +0000, Tom Rhodes wrote: >trhodes 2006-01-21 12:10:33 UTC > > FreeBSD src repository > > Modified files: > sys/nfsserver nfs_serv.c > Log: > Remove some dead code. > > Found with: Coverity Prevent(tm) I'll put my $0.02 in and agree with Stefan Farfeleder. (Luckily, in this case, the notorious NFS macros are not involved). The comments on nfs_namei() state that dirp can be returned not-NULL even if an error occurs and a check of the code paths in nfs_namei() indicates that this is correct. Can you please re-evaluate your change. If (as I suspect), this is actually an incorrect report from Coverity, we should probably report it back to them to investigate. IMHO, as a general rule, I would suggest that dead code that does not trivially resolve to "if (0)" should be replaced by a KASSERT(9) so that if the code path isn't totally dead, we have some chance of finding out about it. Not to pick on Tom, but I've noticed a lot of Coverity fixes being applied. I would expect that Coverity reports would be validated in the same way any any other bug reports (even if that doesn mean wading through NFS's maze of twisty large macros). -- Peter Jeremy