From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736AbaEBInZ (ORCPT ); Fri, 2 May 2014 04:43:25 -0400 Received: from mail-ie0-f170.google.com ([209.85.223.170]:49263 "EHLO mail-ie0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbaEBInV (ORCPT ); Fri, 2 May 2014 04:43:21 -0400 MIME-Version: 1.0 In-Reply-To: <20140501143434.GA18016@ZenIV.linux.org.uk> References: <20140430211206.GU18016@ZenIV.linux.org.uk> <20140430221238.GV18016@ZenIV.linux.org.uk> <20140430234341.GX18016@ZenIV.linux.org.uk> <20140501025105.GY18016@ZenIV.linux.org.uk> <20140501031251.GZ18016@ZenIV.linux.org.uk> <20140501094252.GE3113@tucsk.piliscsaba.szeredi.hu> <20140501143434.GA18016@ZenIV.linux.org.uk> Date: Fri, 2 May 2014 10:43:20 +0200 X-Google-Sender-Auth: CS3mR1GKgX29ER2_M-kjFA1A_yY Message-ID: Subject: Re: dcache shrink list corruption? From: Szeredi Miklos To: Al Viro Cc: Linus Torvalds , Dave Chinner , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 1, 2014 at 4:34 PM, Al Viro wrote: > On Thu, May 01, 2014 at 11:42:52AM +0200, Miklos Szeredi wrote: >> - "bool foo = flag & FLAG" looks suspicious. Is this guaranteed not to >> overflow? > > What do you mean, overflow? It's not a 1-bit unsigned int; conversion to > _Bool is different (which is the only reason why it's more than mere > syntax sugar). See C99 6.3.2.1 ("When any scalar value is converted > to _Bool, the result is 0 if the value compares equal to 0; otherwise, > the result is 1"). Ah, didn't know that. Thanks, Miklos