From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 1/2] Btrfs: allocate extent state and check the result properly Date: Tue, 19 Apr 2011 09:49:52 +0800 Message-ID: <4DACEA40.5020008@cn.fujitsu.com> References: <4DA409E6.7020406@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: LKML , BTRFS To: Chris Mason Return-path: In-Reply-To: <4DA409E6.7020406@cn.fujitsu.com> List-ID: On 04/12/2011 04:14 PM, Xiao Guangrong wrote: > It doesn't allocate extent_state and check the result properly: > - in set_extent_bit, it doesn't allocate extent_state if the path is not > allowed wait > > - in clear_extent_bit, it doesn't check the result after atomic-ly allocate, > we trigger BUG_ON() if it's fail > > - if allocate fail, we trigger BUG_ON instead of returning -ENOMEM since > the return value of clear_extent_bit() is ignored by many callers > Ping...to see what happened. :-)