Commit 0813299
ext4: Fix possible corruption when moving a directory
When we are renaming a directory to a different directory, we need to
update '..' entry in the moved directory. However nothing prevents moved
directory from being modified and even converted from the inline format
to the normal format. When such race happens the rename code gets
confused and we crash. Fix the problem by locking the moved directory.
CC: [email protected]
Fixes: 32f7f22 ("ext4: let ext4_rename handle inline dir")
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>1 parent 172e344 commit 0813299
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3872 | 3872 | | |
3873 | 3873 | | |
3874 | 3874 | | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
3875 | 3880 | | |
3876 | | - | |
| 3881 | + | |
| 3882 | + | |
3877 | 3883 | | |
| 3884 | + | |
3878 | 3885 | | |
3879 | 3886 | | |
3880 | 3887 | | |
| |||
4006 | 4013 | | |
4007 | 4014 | | |
4008 | 4015 | | |
| 4016 | + | |
| 4017 | + | |
4009 | 4018 | | |
4010 | 4019 | | |
4011 | 4020 | | |
| |||
0 commit comments