Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbVKTPeo (ORCPT ); Sun, 20 Nov 2005 10:34:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751251AbVKTPeo (ORCPT ); Sun, 20 Nov 2005 10:34:44 -0500 Received: from ppsw-9.csi.cam.ac.uk ([131.111.8.139]:38556 "EHLO ppsw-9.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S1751247AbVKTPen (ORCPT ); Sun, 20 Nov 2005 10:34:43 -0500 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Date: Sun, 20 Nov 2005 15:34:28 +0000 (GMT) From: Anton Altaparmakov To: Pekka Enberg cc: Phillip Hellewell , akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, mike@halcrow.us, mhalcrow@us.ibm.com, mcthomps@us.ibm.com, yoder1@us.ibm.com Subject: Re: [PATCH 4/12: eCryptfs] Main module functions In-Reply-To: <84144f020511190247n5cf17800lb4ff019aa406470@mail.gmail.com> Message-ID: References: <20051119041130.GA15559@sshock.rn.byu.edu> <20051119041740.GD15747@sshock.rn.byu.edu> <84144f020511190247n5cf17800lb4ff019aa406470@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 26 On Sat, 19 Nov 2005, Pekka Enberg wrote: > On 11/19/05, Phillip Hellewell wrote: > > + BUG(); > > + err = -EINVAL; > > + goto out; > > Why do you want to BUG() and then handle the situation? Because you can define BUG() to nothing (on embedded builds for example) and then you would be screwed if you don't handle the error gracefully. You should never assume something does not return, except perhaps a panic() although someone might even get rid of that one day... Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/