TencentOS-kernel/fs/ext4
zhangyi (F) 87a40eaa35 ext4: do not iput inode under running transaction in ext4_rename()
[ Upstream commit 5dccdc5a1916d4266edd251f20bbbb113a5c495f ]

In ext4_rename(), when RENAME_WHITEOUT failed to add new entry into
directory, it ends up dropping new created whiteout inode under the
running transaction. After commit <9b88f9fb0d2> ("ext4: Do not iput inode
under running transaction"), we follow the assumptions that evict() does
not get called from a transaction context but in ext4_rename() it breaks
this suggestion. Although it's not a real problem, better to obey it, so
this patch add inode to orphan list and stop transaction before final
iput().

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20210303131703.330415-2-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-20 16:06:47 +08:00
..
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
acl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
acl.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
balloc.c ext4: shrink race window in ext4_should_retry_alloc() 2021-05-20 16:06:37 +08:00
bitmap.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
block_validity.c ext4: correctly restore system zone info when remount fails 2021-03-16 16:35:04 +08:00
dir.c ext4: avoid utf8_strncasecmp() with unstable name 2021-03-16 16:30:39 +08:00
ext4.h ext4: shrink race window in ext4_should_retry_alloc() 2021-05-20 16:06:37 +08:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2021-03-16 16:29:42 +08:00
ext4_jbd2.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ext4_jbd2.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
extents.c ext4: fix partial cluster initialization when splitting extent 2021-03-16 16:30:39 +08:00
extents_status.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
extents_status.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
file.c ext4: don't leak old mountpoint samples 2021-04-12 12:51:23 +08:00
fsmap.c ext4: limit entries returned when counting fsmap records 2021-03-16 16:39:03 +08:00
fsmap.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fsync.c ext4: fix race between ext4_sync_parent() and rename() 2021-03-16 16:29:42 +08:00
hash.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ialloc.c ext4: increase wait time needed before reuse of deleted inode numbers 2021-03-16 16:27:15 +08:00
indirect.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
inline.c ext4: unlock xattr_sem properly in ext4_inline_data_truncate() 2021-03-16 16:40:52 +08:00
inode.c ext4: fix bh ref count on error paths 2021-05-20 16:06:45 +08:00
ioctl.c ext4: fix superblock checksum failure when setting password salt 2021-04-12 12:51:27 +08:00
mballoc.c ext4: fix a memory leak of ext4_free_data 2021-03-16 16:43:32 +08:00
mballoc.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
migrate.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mmp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
move_extent.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
namei.c ext4: do not iput inode under running transaction in ext4_rename() 2021-05-20 16:06:47 +08:00
page-io.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
readpage.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
resize.c ext4: fix error handling code in add_new_gdb 2021-03-16 16:40:12 +08:00
super.c ext4: shrink race window in ext4_should_retry_alloc() 2021-05-20 16:06:37 +08:00
symlink.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sysfs.c ext4: shrink race window in ext4_should_retry_alloc() 2021-05-20 16:06:37 +08:00
truncate.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
verity.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xattr.c ext4: add reclaim checks to xattr code 2021-04-12 12:53:32 +08:00
xattr.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xattr_security.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xattr_trusted.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xattr_user.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00