From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bunk Subject: Re: [PATCH 1/10] Convert ASSERT to BUG_ON Date: Fri, 26 May 2006 17:24:01 +0200 Message-ID: <20060526152401.GF17337@stusta.de> References: <20060526142117.GA2764@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Mike Halcrow Return-path: Received: from emailhub.stusta.mhn.de ([141.84.69.5]:12558 "HELO mailout.stusta.mhn.de") by vger.kernel.org with SMTP id S1750896AbWEZPYC (ORCPT ); Fri, 26 May 2006 11:24:02 -0400 To: Mike Halcrow Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, May 26, 2006 at 09:21:48AM -0500, Mike Halcrow wrote: > Use the kernel BUG_ON() macro rather than the eCryptfs ASSERT(). Note > that this temporarily renders the CONFIG_ECRYPT_DEBUG build option > unused. We certainly plan on using it in the future; for now, is it > okay to leave it in fs/Kconfig, or would you like to remove it? >... Remove it as long as it deos nothing - re-adding it when it's actually used will be trivial. > --- a/fs/ecryptfs/keystore.c > +++ b/fs/ecryptfs/keystore.c > @@ -506,7 +506,7 @@ static int decrypt_session_key(struct ec > auth_tok->session_key.encrypted_key_size); > src_sg[0].page = virt_to_page(encrypted_session_key); > src_sg[0].offset = 0; > - ASSERT(auth_tok->session_key.encrypted_key_size < PAGE_CACHE_SIZE); > + BUG_ON(auth_tok->session_key.encrypted_key_size > PAGE_CACHE_SIZE); >... What's with (auth_tok->session_key.encrypted_key_size == PAGE_CACHE_SIZE) ? cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed