Commit 5dccdc5
ext4: do not iput inode under running transaction in ext4_rename()
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>1 parent b7ff91f commit 5dccdc5
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3799 | 3799 | | |
3800 | 3800 | | |
3801 | 3801 | | |
3802 | | - | |
| 3802 | + | |
3803 | 3803 | | |
3804 | 3804 | | |
3805 | 3805 | | |
3806 | 3806 | | |
3807 | 3807 | | |
3808 | 3808 | | |
3809 | | - | |
| 3809 | + | |
3810 | 3810 | | |
3811 | 3811 | | |
3812 | 3812 | | |
| |||
3823 | 3823 | | |
3824 | 3824 | | |
3825 | 3825 | | |
3826 | | - | |
3827 | | - | |
| 3826 | + | |
3828 | 3827 | | |
3829 | 3828 | | |
3830 | 3829 | | |
3831 | 3830 | | |
3832 | 3831 | | |
3833 | | - | |
3834 | | - | |
| 3832 | + | |
3835 | 3833 | | |
3836 | 3834 | | |
3837 | 3835 | | |
| |||
3965 | 3963 | | |
3966 | 3964 | | |
3967 | 3965 | | |
| 3966 | + | |
3968 | 3967 | | |
3969 | 3968 | | |
| 3969 | + | |
3970 | 3970 | | |
3971 | | - | |
| 3971 | + | |
| 3972 | + | |
3972 | 3973 | | |
| 3974 | + | |
3973 | 3975 | | |
3974 | 3976 | | |
3975 | 3977 | | |
3976 | | - | |
3977 | | - | |
3978 | 3978 | | |
3979 | 3979 | | |
3980 | 3980 | | |
| |||
0 commit comments