Re: [PATCH v5.3 08/11] btrfs: extent_io: Kill the BUG_ON() in lock_extent_buffer_for_io()

2019-03-21 Thread David Sterba
On Wed, Mar 20, 2019 at 02:27:46PM +0800, Qu Wenruo wrote: > This function needs some extra check on locked pages and eb. > > For error handling we need to unlock locked pages and the eb. > > Also add comment for possible return values of lock_extent_buffer_for_io(). > > There is a rare >0 retur

[PATCH v5.3 08/11] btrfs: extent_io: Kill the BUG_ON() in lock_extent_buffer_for_io()

2019-03-19 Thread Qu Wenruo
This function needs some extra check on locked pages and eb. For error handling we need to unlock locked pages and the eb. Also add comment for possible return values of lock_extent_buffer_for_io(). There is a rare >0 return value branch, where all pages get locked while write bio is not flushed