From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 23 15:24:39 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE7E2461 for ; Fri, 23 Jan 2015 15:24:39 +0000 (UTC) Received: from mail-qa0-x231.google.com (mail-qa0-x231.google.com [IPv6:2607:f8b0:400d:c00::231]) (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 A41303B0 for ; Fri, 23 Jan 2015 15:24:39 +0000 (UTC) Received: by mail-qa0-f49.google.com with SMTP id v8so6169700qal.8 for ; Fri, 23 Jan 2015 07:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=QvciUcdOdMg/y85V5WkBfUqpQ76U1VwmOfe1PnmLDWI=; b=oEUlGp9iMDDb2HBvpXxIvVQ1NLHG2ANq3A79HeT/8Gw0C8/v81KdLFA1xXdp3sI/+D q8tT6kUtPiaAhTnokMvZZpYDA32g9WDL5/HG2/RU2uCCid3epsmd/2fbEx1GA6fsGugh U9nT3qBFmQXpt7oVaYwpmHKAvk0P+ubg0ShVzlzdVIDiMwADtv19mAmq5MT/IFajBCYi KJhl4/O+qOdA5jIx1ivqGrObhZ6bleOpw+0vhNxl5Pft3Yl7GDVuM7V4Ib7zmbI6BmoE K5LQ/YyR/sVtadbfC76iXS24MWoz8KSZd3dpZenDyYQ/lF3fVX8Vm1TxTeGUJ4lKLay7 kwjQ== X-Received: by 10.140.94.6 with SMTP id f6mr14322904qge.38.1422026678787; Fri, 23 Jan 2015 07:24:38 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Fri, 23 Jan 2015 07:24:18 -0800 (PST) In-Reply-To: <20150123083654.GB42409@kib.kiev.ua> References: <20150120083212.GC42409@kib.kiev.ua> <20150122083514.GU42409@kib.kiev.ua> <20150123083654.GB42409@kib.kiev.ua> From: Ed Maste Date: Fri, 23 Jan 2015 10:24:18 -0500 X-Google-Sender-Auth: sZfO3SVu0WP1jNEi91DjqfPrZh4 Message-ID: Subject: Re: Sleeping thread held mutex in vm_pageout_oom() To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , Ryan Stone X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 15:24:40 -0000 On 23 January 2015 at 03:36, Konstantin Belousov wrote: > On Thu, Jan 22, 2015 at 07:30:19PM -0500, Ryan Stone wrote: >> Other than the redundant braces on the else below, this looks good. I >> tested it today and saw no further problems. > The (possibly implicit) style rule is to have {} around both branches > in if () when one branch requires {}. Unfortunately style(9) presents the opposite case as an example: Closing and opening braces go on the same line as the else. Braces that are not necessary may be left out. if (test) stmt; else if (bar) { stmt; stmt; } else stmt; It does say that the braces "may be" left out though, and I much prefer the guideline as you state it.