On Wed, Apr 11, 2018 at 10:22:58AM +0300, Nikolay Borisov wrote:
> >> +                  free_extent_map(em);
> >> +                  goto unlock_err;
> >> +          }
> >> +          /*
> >> +           * We need to unlock only the end area that we aren't using
> >> +           * if there is any leftover space
> >> +           */
> >> +          free_extent_state(cached_state);
> >>            free_extent_map(em);
> >> -          goto unlock_err;
> >> +          return 0;
> > 
> > Please add a separate label for that, the funcion uses the single exit
> > block style (labels and one-or-two returns).
> 
> So I think this is unnecessary because in 2/2 I factor out common code
> i.e. the free_extent_map(em); return 0; outside of the 'if' branch and
> so this return disappears. The 3rd hunk in 2/2 begins with:
> 
> @@ -7780,106 +7882,8 @@ static int btrfs_get_blocks_direct(struct inode
> *inode, sector_t iblock,
>                * if there is any leftover space
>                */
>               free_extent_state(cached_state);
> -             free_extent_map(em);
> -             return 0;
> -     }

Ok.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to