Commit 407c672
committed
eventfs: Use simple_recursive_removal() to clean up dentries
Looking at how dentry is removed via the tracefs system, I found that
eventfs does not do everything that it did under tracefs. The tracefs
removal of a dentry calls simple_recursive_removal() that does a lot more
than a simple d_invalidate().
As it should be a requirement that any eventfs_inode that has a dentry, so
does its parent. When removing a eventfs_inode, if it has a dentry, a call
to simple_recursive_removal() on that dentry should clean up all the
dentries underneath it.
Add WARN_ON_ONCE() to check for the parent having a dentry if any children
do.
Link: https://lore.kernel.org/all/20231101022553.GE1957730@ZenIV/
Link: https://lkml.kernel.org/r/20231101172650.552471568@goodmis.org
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Fixes: 5bdcd5f ("eventfs: Implement removal of meta data from eventfs")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 62d65ca commit 407c672
2 files changed
Lines changed: 44 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
971 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
972 | 974 | | |
973 | 975 | | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
988 | 987 | | |
989 | 988 | | |
990 | 989 | | |
991 | 990 | | |
992 | 991 | | |
993 | | - | |
| 992 | + | |
994 | 993 | | |
995 | 994 | | |
996 | 995 | | |
| |||
1009 | 1008 | | |
1010 | 1009 | | |
1011 | 1010 | | |
1012 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1013 | 1014 | | |
1014 | 1015 | | |
| 1016 | + | |
1015 | 1017 | | |
1016 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
1017 | 1029 | | |
1018 | | - | |
| 1030 | + | |
1019 | 1031 | | |
1020 | 1032 | | |
1021 | 1033 | | |
| |||
1026 | 1038 | | |
1027 | 1039 | | |
1028 | 1040 | | |
1029 | | - | |
1030 | | - | |
| 1041 | + | |
1031 | 1042 | | |
1032 | 1043 | | |
1033 | 1044 | | |
1034 | 1045 | | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | 1046 | | |
1043 | | - | |
| 1047 | + | |
| 1048 | + | |
1044 | 1049 | | |
1045 | 1050 | | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1053 | 1057 | | |
1054 | 1058 | | |
1055 | 1059 | | |
| |||
1060 | 1064 | | |
1061 | 1065 | | |
1062 | 1066 | | |
1063 | | - | |
| 1067 | + | |
1064 | 1068 | | |
| 1069 | + | |
1065 | 1070 | | |
1066 | 1071 | | |
1067 | | - | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1068 | 1079 | | |
1069 | 1080 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
0 commit comments