Re: [PATCH] btrfs: remove BUG_ON used as assertions

From: Nikolay Borisov
Date: Sun Dec 15 2019 - 12:42:57 EST




On 15.12.19 Ð. 19:12 Ñ., Aditya Pakki wrote:
> alloc_extent_state_atomic() allocates extents via GFP_ATOMIC flag
> and cannot fail. There are multiple invocations of BUG_ON on the
> return value to check for failure. The patch replaces certain
> invocations of BUG_ON by returning the error upstream.
>
> Signed-off-by: Aditya Pakki <pakki001@xxxxxxx>

Have you actually audited all callers of __set_extent_bit whether they
correctly handle failures?