linux/fs/ext4
Stephen Brennan 512286ddc3 ext4: use ext4_grp_locked_error in mb_find_extent
commit cd84bbbac12a173a381a64c6ec8b76a5277b87b5 upstream.

Commit 5d1b1b3f49 ("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 43c73221b3 ("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: 43c73221b3 ("ext4: replace BUG_ON with WARN_ON in mb_find_extent()")
Cc: <stable@vger.kernel.org> # 4.14+
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
Link: https://lore.kernel.org/r/20210623232114.34457-1-stephen.s.brennan@oracle.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-14 16:53:03 +02:00
..
Kconfig
Makefile
acl.c
acl.h
balloc.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 14:47:38 +02:00
bitmap.c
block_validity.c
dir.c
ext4.h ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 14:47:38 +02:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: fix kernel infoleak via ext4_extent_header 2021-07-14 16:53:03 +02:00
extents_status.c ext4: remove check for zero nr_to_scan in ext4_es_scan() 2021-07-14 16:53:03 +02:00
extents_status.h
file.c ext4: don't leak old mountpoint samples 2021-01-19 18:26:13 +01:00
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c ext4: fix avefreec in find_group_orlov 2021-07-14 16:53:03 +02:00
indirect.c
inline.c
inode.c ext4: fix bh ref count on error paths 2021-04-07 14:47:38 +02:00
ioctl.c ext4: fix superblock checksum failure when setting password salt 2021-01-19 18:26:17 +01:00
mballoc.c ext4: use ext4_grp_locked_error in mb_find_extent 2021-07-14 16:53:03 +02:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: do not iput inode under running transaction in ext4_rename() 2021-04-07 14:47:40 +02:00
page-io.c
readpage.c
resize.c
super.c ext4: return error code when ext4_fill_flex_info() fails 2021-07-14 16:53:03 +02:00
symlink.c
sysfs.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 14:47:38 +02:00
truncate.h
verity.c ext4: fix error handling in ext4_end_enable_verity() 2021-05-26 12:05:21 +02:00
xattr.c ext4: add reclaim checks to xattr code 2021-03-30 14:35:29 +02:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c