Files
twx-linux/fs
Jan Kara 352c728653 ext4: Fix deadlock during directory rename
[ Upstream commit 3c92792da8 ]

As lockdep properly warns, we should not be locking i_rwsem while having
transactions started as the proper lock ordering used by all directory
handling operations is i_rwsem -> transaction start. Fix the lock
ordering by moving the locking of the directory earlier in
ext4_rename().

Reported-by: syzbot+9d16c39efb5fade84574@syzkaller.appspotmail.com
Fixes: 0813299c58 ("ext4: Fix possible corruption when moving a directory")
Link: https://syzkaller.appspot.com/bug?extid=9d16c39efb5fade84574
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230301141004.15087-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:58:00 +01:00
..
2023-01-31 16:44:08 -08:00
2022-12-11 18:12:18 -08:00
2023-03-10 09:28:46 +01:00
2023-03-10 09:28:40 +01:00
2022-12-11 18:12:18 -08:00
2023-03-10 09:28:46 +01:00
2023-01-05 07:34:21 -08:00
2023-02-03 17:52:24 -08:00
2022-12-21 14:45:25 +01:00