From owner-svn-src-head@freebsd.org Sat Sep 26 22:41:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1756BA09ABE; Sat, 26 Sep 2015 22:41:25 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [IPv6:2607:f8b0:400e:c03::236]) (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 DDD6F1DBA; Sat, 26 Sep 2015 22:41:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by pablk4 with SMTP id lk4so41322535pab.3; Sat, 26 Sep 2015 15:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=OySIYSUdoFb9/9eAheK0wHjqanRErpwIyRX0bN+ZA5Y=; b=T540a9+6k+amLpaha7KelOcdSjfGMLJL3jRM4xuLw4F8y12+Dau59zRHCV8oxA3uYP 8PsLgW1tGRy4DD1tKxSYL7MvC9WP11DmCGumMCIs19RaVfngtRwZmeyaTaiO/4AG/GOY 59oaLB1NoSNxbfd2nsowYz/sGsNkJSBhx9WHzVQb/f7kes0iF/t7JB3+lu0zTCndRnxF aPOQNDrgIfXybwSTeyzc1vexLD0yXIqXwcRE0iCB4OWh3D2JlUDej3AhhHXIA3aoZlOb ddepk1KuJpNtxcjuvQMBrZ7egx6Kne2B2hXHcwgatqNAGYTBKkOrvjNu512ZBTqAtmE2 mBNQ== X-Received: by 10.69.19.202 with SMTP id gw10mr16857100pbd.60.1443307284461; Sat, 26 Sep 2015 15:41:24 -0700 (PDT) Received: from raichu ([104.232.114.184]) by smtp.gmail.com with ESMTPSA id by1sm11062834pab.6.2015.09.26.15.41.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Sep 2015 15:41:23 -0700 (PDT) Sender: Mark Johnston Date: Sat, 26 Sep 2015 15:41:20 -0700 From: Mark Johnston To: NGie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r288280 - head/sys/kern Message-ID: <20150926224114.GA93979@raichu> References: <201509262226.t8QMQuHh018926@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 26 Sep 2015 22:41:25 -0000 On Sat, Sep 26, 2015 at 03:28:34PM -0700, NGie Cooper wrote: > > > On Sep 26, 2015, at 15:26, Mark Johnston wrote: > > > > Author: markj > > Date: Sat Sep 26 22:26:55 2015 > > New Revision: 288280 > > URL: https://svnweb.freebsd.org/changeset/base/288280 > > > > Log: > > Remove a check for a condition that is always false by a preceding KASSERT > > that was added in r144704. > > > > Modified: > > head/sys/kern/vfs_subr.c > > > > Modified: head/sys/kern/vfs_subr.c > > ============================================================================== > > --- head/sys/kern/vfs_subr.c Sat Sep 26 22:20:30 2015 (r288279) > > +++ head/sys/kern/vfs_subr.c Sat Sep 26 22:26:55 2015 (r288280) > > @@ -1429,11 +1429,6 @@ flushbuflist(struct bufv *bufv, int flag > > KASSERT(bp->b_bufobj == bo, > > ("bp %p wrong b_bufobj %p should be %p", > > bp, bp->b_bufobj, bo)); > > - if (bp->b_bufobj != bo) { /* XXX: necessary ? */ > > - BUF_UNLOCK(bp); > > - BO_LOCK(bo); > > - return (EAGAIN); > > - } > > /* > > * XXX Since there are no node locks for NFS, I > > * believe there is a slight chance that a delayed > > > > Except the KASSERT gets optimized out with !INVARIANTS. Is this if-statement protecting against bad behavior? Technically it was, but it's behaviour that could only occur as a result of a bug elsewhere. The latest reports of this assertion failure that I can find are all from 2005, when some buf-handling bugs were being shaken out (see r147772 and r147387, for example). Given that this invariant is pretty important and that it's been a decade since these bugs were fixed, I believe it's safe to remove the extra handling.