# Re: \[PATCH\] ext4: use ext4\_grp\_locked\_error in mb\_find\_extent

- From: Theodore Ts'o \<tytso@mit.edu\>
- Date: 2021-07-01 21:14:37 
- List: linux-ext4
- Page: https://ratatoskr.run/linux-ext4/2021/07/1431003
- Thread: https://ratatoskr.run/linux-ext4/2021/06/1424281/t.md

```text
On Thu, Jun 24, 2021 at 11:55:01AM +0200, Lukas Czerner wrote:
> On Wed, Jun 23, 2021 at 04:21:14PM -0700, Stephen Brennan wrote:
> > Commit 5d1b1b3f492f ("ext4: fix BUG when calling ext4_error with locked
> > block group") introduces ext4_grp_locked_error to handle unlocking a
> > group in error cases. Otherwise, there is a possibility of a sleep while
> > atomic. However, since 43c73221b3b1 ("ext4: replace BUG_ON with WARN_ON
> > in mb_find_extent()"), mb_find_extent() has contained a ext4_error()
> > call while a group spinlock is held. Replace this with
> > ext4_grp_locked_error.
> > 
> > Fixes: 43c73221b3b1 ("ext4: replace BUG_ON with WARN_ON in mb_find_extent()")
> > Cc: <redacted> # 4.14+
> > Signed-off-by: Stephen Brennan <redacted>
> > Reviewed-by: Junxiao Bi <redacted>
> 
> Good catch, looks good to me.
> 
> Reviewed-by: Lukas Czerner <redacted>

Thanks, applied.

					- Ted
```
