On 26.11.19 г. 5:14 ч., Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> > > While trying to release a page, the extent containing the page may be locked > which would stop the page from being released. Wait for the > extent lock to be cleared, if blocking is allowed and then clear > the bits. > > While we are at it, clean the code of try_release_extent_state() to make > it simpler. > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> > --- > fs/btrfs/extent_io.c | 33 ++++++++++++++------------------- > 1 file changed, 14 insertions(+), 19 deletions(-) > > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index cceaf05aada2..a7c32276702d 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -4367,28 +4367,23 @@ static int try_release_extent_state(struct extent_io_tree *tree, nit: While on it you can change the return type to bool and propagate it up to try_release_extent_mapping and __btrfs_releasepage. But in any case it looks good : Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx> <snip>