On Wed, Sep 12, 2018 at 02:52:38PM +0200, David Sterba wrote: > On Wed, Sep 12, 2018 at 06:06:23AM +0800, Liu Bo wrote: > > btrfs_search_slot() > > if (level != 0) > > setup_nodes_for_search() > > balance_level() > > > > It is just impossible to have level=0 in balance_level. > > While this is true, what do you think about adding ASSERT(level > 0) ? > This is to catch accidentally passing level 0.
Sounds good, will update it. thanks, -liubo