[pnfs] [PATCH 1/1] Replaced BUG() with BUG_ON()
Benny Halevy
bhalevy at panasas.com
Wed May 2 12:39:49 EDT 2007
scratch that, sorry...
Benny Halevy wrote:
> iyer at netapp.com wrote:
>> From: Rahul Iyer <iyer at netapp.com>
>>
>> Replaced instances of
>>
>> if (....)
>> BUG();
>>
>> with
>>
>> BUG_on(...);
>>
>> Signed-off-by: Rahul Iyer <iyer at netapp.com>
>> ---
>> fs/nfs/nfs4proc.c | 31 +++++++++++++------------------
>> 1 files changed, 13 insertions(+), 18 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index b4ce093..89702cf 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -222,10 +222,9 @@ static int nfs41_proc_sequence_done(struct nfs4_session *session, struct nfs41_s
>> unsigned long timestamp;
>> struct nfs4_client *clp;
>>
>> - if (!session || !(clp = session->client)) {
>> - printk(KERN_EMERG "%s is NULL!!!\n", (!session)?"session":"clp");
>> - BUG();
>> - }
>> + BUG_ON(!session);
>
> Rahul, this BUG_ON introduces a bug :-(
> Previously the function just returned if !session,
> now it BUG()'s.
>
>> + clp = session->client;
>> + BUG_ON(!clp);
>>
>
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
--
Benny Halevy
Panasas Inc.
Accelerating Time to Results(TM) with Clustered Storage
www.panasas.com
bhalevy at panasas.com
Tel/Fax: +972-3-647-8340
Mobile: +972-54-802-8340
More information about the pNFS
mailing list