linux/fs/ext4
Zhang Yi d7eb37615b ext4: make sure allocate pending entry not fail
[ Upstream commit 8e387c89e9 ]

__insert_pending() allocate memory in atomic context, so the allocation
could fail, but we are not handling that failure now. It could lead
ext4_es_remove_extent() to get wrong reserved clusters, and the global
data blocks reservation count will be incorrect. The same to
extents_status entry preallocation, preallocate pending entry out of the
i_es_lock with __GFP_NOFAIL, make sure __insert_pending() and
__revise_pending() always succeeds.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230824092619.1327976-3-yi.zhang@huaweicloud.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-03 07:32:10 +01:00
..
.kunitconfig
acl.c
acl.h ext4: apply umask if ACL support is disabled 2023-11-28 17:07:21 +00:00
balloc.c ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-09-19 12:28:05 +02:00
bitmap.c
block_validity.c ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-09-19 12:28:05 +02:00
crypto.c ext4: fix memory leaks in ext4_fname_{setup_filename,prepare_lookup} 2023-09-19 12:28:05 +02:00
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-09-19 12:28:05 +02:00
extents_status.c ext4: make sure allocate pending entry not fail 2023-12-03 07:32:10 +01:00
extents_status.h
extents.c ext4: move 'ix' sanity check to corrent position 2023-11-20 11:52:06 +01:00
fast_commit.c ext4: use ext4_fc_tl_mem in fast-commit replay path 2023-03-11 13:55:22 +01:00
fast_commit.h
file.c ext4: properly sync file size update after O_SYNC direct IO 2023-11-28 17:07:22 +00:00
fsmap.c ext4: fix another off-by-one fsmap error on 1k block filesystems 2023-03-17 08:50:16 +01:00
fsmap.h
fsync.c
hash.c ext4: improve error handling from ext4_dirhash() 2023-05-17 11:53:58 +02:00
ialloc.c ext4: allow ext4_get_group_info() to fail 2023-05-24 17:32:33 +01:00
indirect.c ext4: only update i_reserved_data_blocks on successful block allocation 2023-07-23 13:49:34 +02:00
inline.c ext4: bail out of ext4_xattr_ibody_get() fails for any reason 2023-05-17 11:53:58 +02:00
inode-test.c
inode.c ext4: mark buffer new if it is unwritten to avoid stale data exposure 2023-11-28 17:07:21 +00:00
ioctl.c ext4: fix to check return value of freeze_bdev() in ext4_shutdown() 2023-07-23 13:49:34 +02:00
Kconfig
Makefile
mballoc.c ext4: avoid overlapping preallocations due to overflow 2023-11-02 09:35:32 +01:00
mballoc.h ext4: add two helper functions extent_logical_end() and pa_logical_end() 2023-11-02 09:35:32 +01:00
migrate.c
mmp.c ext4: reflect error codes from ext4_multi_mount_protect() to its callers 2023-05-24 17:32:33 +01:00
move_extent.c
namei.c ext4: fix rec_len verify error 2023-09-23 11:11:12 +02:00
orphan.c
page-io.c ext4: fix cgroup writeback accounting with fs-layer encryption 2023-03-17 08:50:16 +01:00
readpage.c
resize.c ext4: add missed brelse in update_backups 2023-11-28 17:07:21 +00:00
super.c ext4: turn quotas off if mount failed after enabling quotas 2023-07-23 13:49:34 +02:00
symlink.c
sysfs.c ext4: Fix function prototype mismatch for ext4_feat_ktype 2023-02-25 11:25:43 +01:00
truncate.h
verity.c
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: correct inline offset when handling xattrs in inode body 2023-07-27 08:50:31 +02:00
xattr.h