From owner-svn-src-head@freebsd.org Thu Mar 1 01:21:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0A7AF34766 for ; Thu, 1 Mar 2018 01:21:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5461D6FDBD for ; Thu, 1 Mar 2018 01:21:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id p78so5342244iod.13 for ; Wed, 28 Feb 2018 17:21:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=L+6CGghJ2TOYFVE74zOn5odNQKJ58gAIZwdIDYXziRo=; b=f/TMD/lgjtu81SZdzsKH/alDLJREFvkPNMfCjGB72M/jg+y2d1bDermC6Q1F22aqMH bltNQzDdrRR+rv4Eb1lC/GvAevr5Zoy8glPxjDfpdhXg7ob4yKJ43itC0pvJQcTsXMN4 3k8anaBtFyHrwsES9FfBIRzY9SUC6SsJyK10DUsAZeCVwH1rjNwNDVOfjiEFuPAkA6qR 8X6IRXkS7+okxafI/sRovkoD/ctQCPYQVVlyrNCx+V1p5sfQT4/6MXyIJlktBraYwxN6 ZfE4nIX+J7aaM801hAHH2k/FjB2wECstEFAufds50jW7KQY3RUKxl3/Pme/NnxqV/N8y u13Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=L+6CGghJ2TOYFVE74zOn5odNQKJ58gAIZwdIDYXziRo=; b=So2UM04Qhrz1xvOWrhGEPf5Vs8fWVnro/u1P+8jCiO0uJfPVIwG3VKjmgL+CwLDQwX e8/r8L/qDZifjKfS6ZTUj7ExVHDHkTF5NuNvDnVUCA+qIMSsvurcUEVEABbsfrQH2QlJ WhOozeFUEvprJ7Zvs9i7GQtEb1C3KY14eiQin5XFZYw1feoy+jfhBWHPX3ntCw67VFyO gw1MyNesENiw8+FPrWw9P23fO3+bM5bLwy085hF86XwTApgKe4gjWU7q7MJZGlk8ESht icVXxGOAhxVNOdp43kvxcj8HQgY6iBNfTrkUftsOrOhO7eZj/hOKWu1l4BQHuMmZS8eH Ha6g== X-Gm-Message-State: APf1xPDoBvZW20FdkHR7/N7JQZ4WTTDJ+gH65TZpECJtEj0E1KKguCXA 0uJuG3V0nuj/HWDFqiK1IFkNaShRhLhTeCycPeWswQ== X-Google-Smtp-Source: AG47ELtJNaJcaBUeg2m2cVZsTxzKYWBiGaO3y5sMLke/ufTtsIVmGtxV7EboHMa7aw53+Co6AnmdOrsjiNrVs6IkKnE= X-Received: by 10.107.187.129 with SMTP id l123mr93013iof.39.1519867302536; Wed, 28 Feb 2018 17:21:42 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.150.220 with HTTP; Wed, 28 Feb 2018 17:21:41 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <201803010059.w210xoZ3022625@pdx.rh.CN85.dnsmgr.net> References: <201803010029.w210TqF5069963@repo.freebsd.org> <201803010059.w210xoZ3022625@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Wed, 28 Feb 2018 18:21:41 -0700 X-Google-Sender-Auth: kUrySqGGD6_NqT65H4RsBz0jNNQ Message-ID: Subject: Re: svn commit: r330135 - head/sys/ufs/ffs To: "Rodney W. Grimes" Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 01:21:44 -0000 On Wed, Feb 28, 2018 at 5:59 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: cem > > Date: Thu Mar 1 00:29:52 2018 > > New Revision: 330135 > > URL: https://svnweb.freebsd.org/changeset/base/330135 > > > > Log: > > ffs: softdep_disk_write_complete: Quiesce spurious Coverity warning > > > > Coverity cannot determine that handle_written_indirdep() does not > access > > uninitialized 'sbp' when flags argument is zero. > > > > So, simply move the initialization slightly sooner to silence the > warning. > > > > No functional change. > > I am always concerned when we modify code just to silence a > warning from a static analysis tool. There use to be a pretty > hard and fast rule about this: Dont do it, at most document > that the tool is lacking and giving false positives. > > It double raises an eye brow when the change is made to > silence the tool and "no function change" should be occuring. In this case, there's no harm, and I think it makes the code a little easier to understand... Warner > > Reported by: Coverity > > Sponsored by: Dell EMC Isilon > > > > Modified: > > head/sys/ufs/ffs/ffs_softdep.c > > > > Modified: head/sys/ufs/ffs/ffs_softdep.c > > ============================================================ > ================== > > --- head/sys/ufs/ffs/ffs_softdep.c Thu Mar 1 00:05:14 2018 > (r330134) > > +++ head/sys/ufs/ffs/ffs_softdep.c Thu Mar 1 00:29:52 2018 > (r330135) > > @@ -10984,6 +10984,8 @@ softdep_disk_write_complete(bp) > > if (ump == NULL) > > return; > > > > + sbp = NULL; > > + > > /* > > * If an error occurred while doing the write, then the data > > * has not hit the disk and the dependencies cannot be processed. > > @@ -11026,7 +11028,6 @@ softdep_disk_write_complete(bp) > > /* > > * Ump SU lock must not be released anywhere in this code segment. > > */ > > - sbp = NULL; > > owk = NULL; > > while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) { > > WORKLIST_REMOVE(wk); > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > >